87 lines
2.8 KiB
Plaintext
87 lines
2.8 KiB
Plaintext
close all;
|
|
clear all;
|
|
|
|
dir1 = "Sin_Variar";
|
|
parametro = ["Phi_r","fc_corrientes","Ld","Lq","R","T_ref","Vdc"];
|
|
Multiplicador = ["05","15"];
|
|
|
|
for param = parametro
|
|
for mult = Multiplicador
|
|
|
|
dir2 = strcat(param,'/',param,'_',mult);
|
|
ley1 = "Sin Variar";
|
|
ley2 = strcat(param,'*',mult);
|
|
|
|
dir = [dir2,dir1];
|
|
|
|
figure('Color','w');
|
|
for i = dir
|
|
load (strcat('data/',i,'/Speed.mat'));
|
|
load (strcat('data/',i,'/Torque.mat'));
|
|
plot(Speed.Data*60/2/pi,Torque.Data);
|
|
hold on
|
|
end
|
|
legend(ley2,ley1,'Location', 'best')
|
|
xlabel('Speed [rpm]');
|
|
ylabel('Torque [N-m]');
|
|
title('Torque and Speed');
|
|
saveas(gcf,strcat('Imagenes/',dir2,'/Comparativa/Torque and Speed.png'))
|
|
|
|
figure('Color','w');
|
|
for i = dir
|
|
load (strcat('data/',i,'/Speed.mat'));
|
|
load (strcat('data/',i,'/Torque.mat'));
|
|
plot(Speed.Data*60/2/pi,Torque.Data.*Speed.Data/1000);
|
|
hold on
|
|
end
|
|
legend(ley2,ley1,'Location', 'best')
|
|
xlabel('Speed [rpm]');
|
|
ylabel('Power [kW]');
|
|
title('Power and Speed');
|
|
saveas(gcf,strcat('Imagenes/',dir2,'/Comparativa/Power and Speed.png'))
|
|
|
|
|
|
|
|
figure('Color','w');
|
|
for i = dir
|
|
load (strcat('data/',i,'/Speed.mat'));
|
|
load (strcat('data/',i,'/vdq.mat'));
|
|
plot(Speed.Data*60/2/pi,vdq.Data);
|
|
hold on
|
|
end
|
|
legend(strcat("Vd ",ley2), strcat("Vq ",ley2), strcat("Vd ",ley1),strcat("Vq ",ley1),'Location', 'best');
|
|
xlabel('Speed [rpm]');
|
|
ylabel('Voltage [V]');
|
|
title('Vdq and Speed');
|
|
saveas(gcf,strcat('Imagenes/',dir2,'/Comparativa/Vdc and Speed.png'))
|
|
|
|
figure('Color','w');
|
|
for i = dir
|
|
load (strcat('data/',i,'/Speed.mat'));
|
|
load (strcat('data/',i,'/idq.mat'));
|
|
plot(Speed.Data*60/2/pi,idq.Data);
|
|
hold on
|
|
end
|
|
legend(strcat("id ",ley2), strcat("iq ",ley2), strcat("id ",ley1),strcat("iq ",ley1),'Location', 'best');
|
|
xlabel('Speed [rpm]');
|
|
ylabel('Current [A]');
|
|
title('idq and Speed');
|
|
saveas(gcf,strcat('Imagenes/',dir2,'/Comparativa/idq and Speed.png'))
|
|
|
|
figure('Color','w');
|
|
for i = dir
|
|
load (strcat('data/',i,'/Speed.mat'));
|
|
load (strcat('data/',i,'/idq_plus_FW.mat'));
|
|
plot(Speed.Data*60/2/pi,idq_plus_FW.Data);
|
|
hold on
|
|
end
|
|
legend(strcat("id ",ley2), strcat("iq ",ley2), strcat("id ",ley1),strcat("iq ",ley1),'Location', 'best');
|
|
xlabel('Speed [rpm]');
|
|
ylabel('Current [A]');
|
|
title('idq plus FW and Speed');
|
|
saveas(gcf,strcat('Imagenes/',dir2,'/Comparativa/idq plus FW and Speed.png'))
|
|
|
|
close all;
|
|
end
|
|
end
|