%==========================================================================
%                      P O M O C N Ý   P R O G R A M                      %
%==========================================================================
%
close all
clear all
clc
nazev='Pomocný program';
%
%==========================================================================
%         GRAFY STABILITNÍCH MEZÍ PRO VARIACI VSTUPNÍCH PARAMETRU         %
%==========================================================================
%
% Nejprve je tøeba nahrát data získaná programem WhirlFlutter2.m
%
load('PomocnySoubor.mat');
%
%==========================================================================
%                            NASTAVENÍ VÝSTUPU                            %
%==========================================================================
%
%                    % VŽDY JEN JEDNA HODNOTA MUŽE BÝT 1 (konflikt
%                      promìnných)
%
mez_tlumeni=0;       % Nastav 1 pro závislost soustavy na vnitøním tlumení
%
mez_nesym_tlumeni=0; % Nastav 1 pro závislost pøi nesymetrickém tlumení
%
mez_rychlost=0;      % Nastav 1 pro závislost soustavy na rychlosti letu
%
mez_otacky=0;        % Nastav 1 pro závislost soustavy na otáèkách vrtule
%
mez_gyroskop=0;      % Nastav 1 pro závislost soustavy na polárním momentu
%
mez_mom_setrvac_yz=0;% Nastav 1 pro závislost pøi nesymetrických mom. Jy,z
%
mez_nesym_mom_setr=0;% Nastav 1 pro závislost soustavy na Jy,z (setr. mom.)
%
mez_delka_vyloz=0;   % Nastav 1 pro závislost soustavy na délce vyložení
%
mez_vyska_letu=0;    % Nastav 1 pro závislost soustavy na výšce letu
%
mez_vztlak_cara=0;   % Nastav 1 pro závislost soustavy na cy^alpha
%
%==========================================================================
%              STABILITNÍ MEZ TLUMENÁ VS.NETLUMENÁ SOUSTAVA               %
%==========================================================================
%
if mez_tlumeni==1
x=5:0.1:9.7;
y=x;
figure(1)
hold on
p1=plot(reseni_psia,reseni_thetaa,'k','LineWidth',1);
p2=plot(reseni_psi2a,reseni_theta2a,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psic,reseni_thetac,'b','LineWidth',1);
p6=plot(reseni_psi2c,reseni_theta2c,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv symetrického vnitøního tlumení')
legend([p1 p3 p5],{'\xi_{\Theta,\Psi}=0.00 [1]',...
                   '\xi_{\Theta,\Psi}=0.01 [1]',...
                   '\xi_{\Theta,\Psi}=0.02 [1]'},...
                   'Location','northeast')
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(8.5,10.5,txt);
end
%
%==========================================================================
%                  STABILITNÍ MEZ NESYMETRICKÉ TLUMENÍ                    %
%==========================================================================
%
if mez_nesym_tlumeni==1
x=5.5:0.1:7.8;
y=x;
figure(1)
hold on
p1=plot(reseni_psiq,reseni_thetaq,'k','LineWidth',1);
p2=plot(reseni_psi2q,reseni_theta2q,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psir,reseni_thetar,'b','LineWidth',1);
p6=plot(reseni_psi2r,reseni_theta2r,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv nesymetrického vnitøního tlumení')
legend([p1 p3 p5],{'\xi_{\Theta}=0.00 \xi_{\Psi}=0.02 [1]',...
                   '\xi_{\Theta}=0.01 \xi_{\Psi}=0.01 [1]',...
                   '\xi_{\Theta}=0.02 \xi_{\Psi}=0.00 [1]'},...
                   'Location','northeast')
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(7.5,9,txt);
end
%
%==========================================================================
%                 STABILITNÍ MEZ PROMÌNNÁ RYCHLOST LETU                   %
%==========================================================================
%
if mez_rychlost==1
x=3.5:0.1:8.8;
y=x;
figure(2)
hold on
p1=plot(reseni_psid,reseni_thetad,'k','LineWidth',1);
p2=plot(reseni_psi2d,reseni_theta2d,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psie,reseni_thetae,'b','LineWidth',1);
p6=plot(reseni_psi2e,reseni_theta2e,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv rychlosti letu')
legend([p1 p3 p5],{'v_\infty=200    [m/s]','v_\infty=137.5 [m/s]',...
                   'v_\infty=75      [m/s]'},'Location','northeast')                 
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(1.3,2.3,txt);
txt = {'STABILITY'};
text(9,10,txt);
end
%
%==========================================================================
%                  STABILITNÍ MEZ PROMÌNNÉ OTÁÈKY VRTULE                  %
%==========================================================================
%
if mez_otacky==1
x=4.3:0.1:8.3;
y=x;
figure(3)
hold on
p1=plot(reseni_psif,reseni_thetaf,'k','LineWidth',1);
p2=plot(reseni_psi2f,reseni_theta2f,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psig,reseni_thetag,'b','LineWidth',1);
p6=plot(reseni_psi2g,reseni_theta2g,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv otáèek vrtule')
legend([p1 p3 p5],{'n=3000 [ot/min]','n=2080 [ot/min]',...
                   'n=1160 [ot/min]'},'Location','northeast')                  
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(1.5,3,txt);
txt = {'STABILITY'};
text(8.5,10,txt);
end
%
%==========================================================================
% STABILITNÍ MEZ GYROSKOPICKÉ MOMENTY (PROMÌNNÝ POLÁRNÍ MOMENT VRTULE Jx) %
%==========================================================================
%
if mez_gyroskop==1
x=5:0.1:8;
y=x;
figure(4)
hold on
p1=plot(reseni_psih,reseni_thetah,'k','LineWidth',1);
p2=plot(reseni_psi2h,reseni_theta2h,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psii,reseni_thetai,'b','LineWidth',1);
p6=plot(reseni_psi2i,reseni_theta2i,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv polárního momentu vrtule')
legend([p1 p3 p5],{'J_x=25.5 [kgm^2]','J_x=20.5 [kgm^2]',...
                   'J_x=15.5 [kgm^2]'},'Location','northeast')                 
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(7,9,txt);
end
%
%==========================================================================
%        STABILITNÍ MEZ MOMENTY SETRVAÈNOSTI CELÉ SOUSTAVY (Jy,Jz)        %
%==========================================================================
%
if mez_mom_setrvac_yz==1
x=5:0.1:8.3;
y=x;
figure(5)
hold on
p1=plot(reseni_psij,reseni_thetaj,'k','LineWidth',1);
p2=plot(reseni_psi2j,reseni_theta2j,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psik,reseni_thetak,'b','LineWidth',1);
p6=plot(reseni_psi2k,reseni_theta2k,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv momentù setrvaènosti celé soustavy')
legend([p1 p3 p5],{'J_y=J_z=157 [kgm^2]','J_y=J_z=126 [kgm^2]',...
                   'J_y=J_z=94   [kgm^2]'},'Location','northeast')                
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(7,9.5,txt);
end
%
%==========================================================================
%         STABILITNÍ MEZ NESYMETRICKÉ MOMENTY SETRVAÈNOSTI (Jy,Jz)        %
%==========================================================================
%
if mez_nesym_mom_setr==1
x=5:0.1:8.3;
y=x;
figure(5)
hold on
p1=plot(reseni_psis,reseni_thetas,'k','LineWidth',1);
p2=plot(reseni_psi2s,reseni_theta2s,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psit,reseni_thetat,'b','LineWidth',1);
p6=plot(reseni_psi2t,reseni_theta2t,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv nesymetrických momentù setrvaènosti')
legend([p1 p3 p5],{'J_y=157 J_z=94   [kgm^2]','J_y=126 J_z=126 [kgm^2]',...
                   'J_y=94  J_z=157  [kgm^2]'},'Location','northeast')                
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(7,9.5,txt);
end
%
%==========================================================================
%               STABILITNÍ MEZ PROMÌNNÁ DÉLKA VYLOŽENÍ (a)                %
%==========================================================================
%
if mez_delka_vyloz==1
x=5:0.1:8.3;
y=x;
figure(6)
hold on
p1=plot(reseni_psil,reseni_thetal,'k','LineWidth',1);
p2=plot(reseni_psi2l,reseni_theta2l,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psim,reseni_thetam,'b','LineWidth',1);
p6=plot(reseni_psi2m,reseni_theta2m,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv délky vyložení')
legend([p1 p3 p5],{'a=1.3   [m]','a=1.05 [m]',...
                   'a=0.8   [m]'},'Location','northeast')                
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2,3.5,txt);
txt = {'STABILITY'};
text(8.5,10,txt);
end
%
%==========================================================================
%                   STABILITNÍ MEZ PROMÌNNÁ VÝŠKA LETU                    %
%==========================================================================
%
if mez_vyska_letu==1
x=4.5:0.1:7.5;
y=x;
figure(7)
hold on
p1=plot(reseni_psin,reseni_thetan,'k','LineWidth',1);
p2=plot(reseni_psi2n,reseni_theta2n,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p5=plot(reseni_psio,reseni_thetao,'b','LineWidth',1);
p6=plot(reseni_psi2o,reseni_theta2o,'b','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv výšky letu')
legend([p3 p1 p5],{'H=0       [m]','H=4000 [m]',...
                   'H=8000 [m]'},'Location','northeast')                
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(1.9,3.5,txt);
txt = {'STABILITY'};
text(8.5,10,txt);
end
%
%==========================================================================
%             STABILITNÍ MEZ PRO STOUPÁNÍ VZTLAKOVÉ ÈÁRY 2pí              %
%==========================================================================
%
if mez_vztlak_cara==1
x=5.5:0.1:7.5;
y=x;
figure(8)
hold on
p1=plot(reseni_psip,reseni_thetap,'k','LineWidth',1);
p2=plot(reseni_psi2p,reseni_theta2p,'k','LineWidth',1);
p3=plot(reseni_psib,reseni_thetab,'r','LineWidth',1);
p4=plot(reseni_psi2b,reseni_theta2b,'r','LineWidth',1);
p7=plot(x,y,'--','Color',[0.80 0.80 0.80],'LineWidth',0.5);
hold off
axis equal
title('Vliv stoupání vztlakové èáry')
legend([p1 p3],{'c_y^{\alpha}=2\pi        [1/rad]',...
                'c_y^{\alpha}=c_y^{\alpha} real [1/rad]'},...
                'Location','northeast')                
xlabel('f_{\Psi} [Hz]')
ylabel('f_{\Theta} [Hz]')
xlim([0,15])
ylim([0,15])
txt = {'FLUTTER'};
text(2.2,3.7,txt);
txt = {'STABILITY'};
text(8.5,10,txt);
end
%

