sim('adv_angle_new');
sim('adv_angle_new2');
sim('adv_angle_new3');
sim('adv_angle_new4');
sim('adv_angle_new5');
load  bldc_advangle.mat
load  bldc_adv2.mat
load  bldc_adv3.mat
load  bldc_adv4.mat
load  bldc_adv5.mat
va=ans(2,:);
vb=ans(3,:);
vc=ans(4,:);
speed1=ans(5,:);
speed2=ans2(5,:);
speed3=ans3(5,:);
speed4=ans4(5,:);
speed5=ans5(5,:);
%te=ans(6,:);
%phi=ans(7,:);
ha=ans(8,:);
%hb=ans(9,:);
%hc=ans(10,:);
%ea=ans(11,:);
 ea2=ans2(11,:);
%eb=ans(12,:);
%ec=ans(13,:);
%theta=ans(14,:);
%ic=ans(15,:);
%ib=ans(16,:);
ia2=ans2(17,:);
tl1=ans(18,:);
tl2=ans2(18,:);
tl3=ans3(18,:);
tl4=ans4(18,:);
tl5=ans5(18,:);
ha2 =ans3(20,:);


plot(t,ha,t2,ha2);

figure(1)

subplot(2,1,1);
plot(t,ha);
grid on;
hold on; 
subplot(2,1,2);
plot(t2,ha2);
grid on;
hold on;

subplot(3,1,3);
plot(time,vc);
grid on;

plot(speed1,tl1,'green','LineWidth',2);
axis ([1000  2600  0.2 0.34]);
grid on;
hold on;

plot(speed2,tl2,'red','LineWidth',2);
%axis ([0  0.5  900 2400]);
grid on;
hold on;

plot(speed3,tl3,'blue','LineWidth',2);
axis ([1000  2600  0.2 0.34]);
grid on;
hold on;
plot(speed4,tl4,'black','LineWidth',2);
%axis ([0  0.5  900 2000]);
grid on;
hold on;

plot(speed5,tl5,'yellow','LineWidth',2);
%axis ([0  0.5  900 2000]);

plot(time,ia2,time,ea2,'black','LineWidth',2);
axis ([1.2  1.28  -25 25]);

