load graf1.txt -ascii

% t, Isx, Isy, Isd, Isdw, Isq, Isqw, M, Fs, poloha, rychlost, rychlost_w,
% Urm, Urm_max, beta, zbeta, Uc

figure
plot(graf1(:,1),graf1(:,2))     % Isx
% hold on
% plot(graf1(:,1),graf1(:,3),'r')
legend('Isx');

figure
plot(graf1(:,1),graf1(:,4))     % Isd
hold on
plot(graf1(:,1),graf1(:,5),'r')    
legend('Isd','Isdw');

figure
plot(graf1(:,1),graf1(:,6))     % Isq
hold on
plot(graf1(:,1),graf1(:,7),'r')   
legend('Isq','Isqw');

figure
plot(graf1(:,1),graf1(:,8))     % M
hold on
plot(graf1(:,1),graf1(:,16),'r')     % M_model
legend('Moment','Moment model');

figure
plot(graf1(:,1),graf1(:,9))     % Fs
hold on
plot(graf1(:,1),graf1(:,15),'r')     % Fs_model
legend('Fs','Fs model');

figure
plot(graf1(:,1),graf1(:,10))     % Poloha
title('Poloha theta elektricka');

figure
plot(graf1(:,1),graf1(:,11)/(2*pi))     % fme
hold on
plot(graf1(:,1),graf1(:,12)/(2*pi),'r')     
legend('fme','fmew');

figure
plot(graf1(:,1),graf1(:,13))     % Urm
hold on
plot(graf1(:,1),graf1(:,14),'r')     
legend('Urm','Urm max');

figure
plot(graf1(:,1),graf1(:,17)/pi*180)     % zatezny uhel (beta)
legend('zatezny uhel (beta)');

figure
plot(graf1(:,1),graf1(:,18)/pi*180)     % zatezny uhel (zbeta) - vypocet z napeti
legend('zatezny uhel (zbeta)');

figure
plot(graf1(:,1),graf1(:,19))     % Uc
legend('Uc');

figure
plot(graf1(:,1),graf1(:,20))     % Um*2/Ucn
legend('Um*2/Ucn');

figure
plot(graf1(:,1),graf1(:,21))     % Upila
hold on
plot(graf1(:,1),graf1(:,22),'r')     % Ua
legend('Upila','Ua');

figure
plot(graf1(:,1),graf1(:,23))     % Ukomp
legend('Ukomp');

figure
plot(graf1(:,1),graf1(:,24))     % ALGORITMUS
legend('ALGORITMUS');

figure
plot(graf1(:,1),graf1(:,25)/2/pi)     % fme_ekf
hold on
plot(graf1(:,1),graf1(:,11)/(2*pi),'r')     % fme skutecna
legend('fme ekf','fme');

figure
plot(graf1(:,1),graf1(:,26))     % theta_elektricka_ekf
hold on
plot(graf1(:,1),graf1(:,10),'r')     % Poloha elektricka skutecna
legend('Theta ekf','Theta real');

