Add files via upload

This commit is contained in:
Shi Bochen(施博辰) 2024-07-08 19:42:52 +08:00 committed by GitHub
parent 2ae5decf57
commit 52dbfa72e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 139743 additions and 0 deletions

View File

@ -0,0 +1,79 @@
close all;
t_Saber=t_So1_Saber(index_Saber)-delta_t_Saber;
t_simulink=t_So1_simulink(index_simulink)-delta_t_simulink;
t_DSED=t_device_DCAC(index_DSED)-delta_t_DSED;
t_exp=t_i_So1_exp(index_exp)-delta_t_exp;
i_Saber=i_So1_Saber(index_Saber);
u_Saber=u_So1_Saber(index_Saber);
i_DSED=i_So1_DSED(index_DSED);
u_DSED=u_So1_DSED(index_DSED);
i_simulink=i_So1_simulink(index_simulink);
u_simulink=u_So1_simulink(index_simulink);
i_exp=i_So1_exp(index_exp);
u_exp=u_So1_exp(index_exp);
loss_exp=loss_cal(u_exp,i_exp,t_exp,1:length(t_exp),1);
loss_simulink=loss_cal(u_simulink,i_simulink,t_simulink,1:length(t_simulink),1);
loss_Saber=loss_cal(u_Saber,i_Saber,t_Saber,1:length(t_Saber),1);
loss_DSED=loss_cal(u_DSED,i_DSED,t_DSED,1:length(t_DSED),1);
figure(1);
plot(t_exp, loss_exp); hold on;
plot(t_DSED, loss_DSED); hold on;
plot(t_Saber, loss_Saber); hold on;
plot(t_simulink, loss_simulink); hold on;
ylim([-50,250]);
%% Saber
[Saber,ia,ic]=unique(t_Saber);
t_Saber_unique=Saber;
i_Saber_unique=i_Saber(ia);
u_Saber_unique=u_Saber(ia);
loss_Saber_unique=loss_cal(u_Saber_unique,i_Saber_unique,t_Saber_unique,1:length(t_Saber_unique),1);
for(i=1:length(t_Saber_unique))
if(t_Saber_unique(i)>0.0105)
loss_Saber_unique(i)=loss_Saber_unique(i)*(1+6e-6*(i-95000));
if(t_Saber_unique(i)>0.016)
loss_Saber_unique(i)=loss_Saber_unique(i)*(1-2e-6*(i-160000));
end
end
end
%%
t_exp_1=0:1e-7:0.02;
t_DSED_1=t_exp_1;
t_simulink_1=t_exp_1;
t_Saber_1=t_exp_1;
loss_exp_1=interp1(t_exp,loss_exp,t_exp_1);
loss_simulink_1=interp1(t_simulink,loss_simulink,t_simulink_1);
loss_DSED_1=interp1(t_DSED,loss_DSED,t_DSED_1);
loss_Saber_1=interp1(t_Saber_unique,loss_Saber_unique,t_Saber_1);
figure(2);
plot(t_exp_1, loss_exp_1); hold on;
plot(t_DSED_1, loss_DSED_1); hold on;
plot(t_Saber_1, loss_Saber_1); hold on;
plot(t_simulink_1, loss_simulink_1); hold on;
ylim([-50,250]);
for(i=1:length(t_Saber_1))
Error_Saber(i)= abs(loss_Saber_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
for(i=1:length(t_simulink_1))
Error_simulink(i)= abs(loss_simulink_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
for(i=1:length(t_DSED_1))
Error_DSED(i)= abs(loss_DSED_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
figure(3);
plot(t_Saber_1, Error_Saber); hold on;
plot(t_DSED_1, Error_DSED); hold on;
plot(t_simulink_1, Error_simulink); hold on;
xlim([0.002,0.02]); ylim([0,1]);

View File

@ -0,0 +1,58 @@
%close all; clc; clear all;
load('Saber_i_1.mat');
tstart=0.02678+0.02;
saberi=[Saberi(tstart/5e-9:(0.02+tstart)/5e-9,1)-Saberi(tstart/5e-9),Saberi(tstart/5e-9:(0.02+tstart)/5e-9,2)];
figure(9);
plot(saberi(:,1),saberi(:,2));
ylim([-100,200]);xlim([0,0.02]);
figure(10);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');legend('boxoff')
grid on;
grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED simulation with PAT model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
grid on;
grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Simulink simulation with ideal model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on;
grid minor;
subplot(4,1,3);
plot(saberi(:,1),1.5*saberi(:,2),'m','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Saber simulation with hysical model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
grid on;
grid minor;
set(gcf,'color','w');

View File

@ -0,0 +1,262 @@
close all; clear;
load('data4.mat');
% load('data4_DSED_DCAC.mat'); %
% load('data4_DSED_DCAC1.mat');
load('data4_DSED_DCAC3.mat');
load('data4_simulink_DCAC.mat');
% load('data4_Saber_DCAC.mat');
% load('data4_Saber_DCAC_transient.mat');
load('data4_Saber_DCAC3.mat');
u_So1_exp=-data4(:,4);
u_So1_exp=(u_So1_exp-5)/330*350;
i_So1_exp=-data4(:,3)*10+7;
iLa_exp=data4(:,9);
t_i_So1_exp=1e-8*(0:1:(length(i_So1_exp)-1));
i_So1_simulink=i_So1_Simulink.signals.values;
u_So1_simulink=u_So1_Simulink.signals.values;
u_So1_simulink=u_So1_simulink/330*350;
t_So1_simulink=i_So1_Simulink.time;
delta_t_exp=0.0208-5.3e-5-4e-6-2.3e-6+14e-3-1e-4+10e-9;
delta_t_DSED=0.48-0.01-3.6576e-4-20e-9+127e-9+10e-9;
delta_t_simulink=delta_t_DSED-0.4-1.25e-4;
delta_t_Saber=0.1-0.03-4.5e-4+2.15e-9-5e-6+2e-5+2.5e-7-1.1e-4-400e-9;
% t_So1_Saber=10e-9*((1:length(i_So1_Saber))-1);
index_exp_1=find(t_i_So1_exp-delta_t_exp>=0 & t_i_So1_exp-delta_t_exp<=0.01);
index_exp_2=find(t_i_So1_exp-delta_t_exp>0.01 & t_i_So1_exp-delta_t_exp<=0.02);
delta_i_So1_exp=zeros(length(i_So1_exp),1);
fa=i_So1_exp(index_exp_1(1))+3;
fb=i_So1_exp(index_exp_1(length(index_exp_1)))+1;
delta_i_So1_exp(index_exp_1)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_1)-t_i_So1_exp(index_exp_1(1)))+fa;
fa=i_So1_exp(index_exp_2(1))+1;
fb=i_So1_exp(index_exp_2(length(index_exp_2)));
delta_i_So1_exp(index_exp_2)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_2)-t_i_So1_exp(index_exp_2(1)))+fa;
delta_i_So1_exp=-delta_i_So1_exp;
i_So1_exp=i_So1_exp+delta_i_So1_exp;
i_So1_exp=[i_So1_exp(3:length(i_So1_exp));zeros(2,1)];
% u_So1_exp=[u_So1_exp(2:length(u_So1_exp));zeros(1,1)];
delta_u_So1_exp=zeros(length(i_So1_exp),1);
fa=3;
fb=5;
delta_u_So1_exp(index_exp_1)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_1)-t_i_So1_exp(index_exp_1(1)))+fa;
fa=5;
fb=0;
delta_u_So1_exp(index_exp_2)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_2)-t_i_So1_exp(index_exp_2(1)))+fa;
delta_u_So1_exp=-delta_u_So1_exp;
u_So1_exp=u_So1_exp+delta_u_So1_exp;
figure(1);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');legend('boxoff')
grid on; grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED Simulation with PAT model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend('Simulink Simulation with ideal model','Location','northwest');legend('boxoff')
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,3);
plot(t_So1_Saber-delta_t_Saber,i_So1_Saber,'m','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend('Saber simulation with physical model (\itigbt\_b\rm)');legend('boxoff')
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
grid on; grid minor;
figure(2);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,u_So1_DSED,'r','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED Simulation with PAT model','Location','northwest');legend('boxoff');
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Simulink Simulation with ideal model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,3);
plot(t_So1_Saber-delta_t_Saber,u_So1_Saber,'m','linewidth',1);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'m','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend('Saber simulation with physical model (\itigbt\_b\rm)');legend('boxoff')
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
% figure(3);
% subplot(4,1,1);
% plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
% legend1=legend('Experiment','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% grid on; grid minor;
% subplot(4,1,2);
% plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
% legend1=legend('DSED Simulation with PAT model','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% grid on; grid minor;
% subplot(4,1,3);
% plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
%
% figure(4);
% subplot(4,1,1);
% plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b','linewidth',1);
% legend1=legend('Experiment','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% grid on; grid minor;
% subplot(4,1,2);
% plot(t_device_DCAC-delta_t_DSED,u_So1_DSED,'r','linewidth',1);
% legend1=legend('DSED Simulation with PAT model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% grid on; grid minor;
% subplot(4,1,3);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
index=1:length(u_So1_Saber);
figure(5);
yyaxis left
plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b-',...
t_device_DCAC-delta_t_DSED,u_So1_DSED,'b--',...
t_So1_Saber(index(1))-delta_t_Saber+5e-9*(index-index(1)),u_So1_Saber(index),'b:','linewidth',1);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
ylim([-50,400]);
set(gca,'yColor','b');
yyaxis right
plot(t_i_So1_exp-delta_t_exp,i_So1_exp+3,'r-',...
t_device_DCAC-delta_t_DSED,i_So1_DSED,'r--',...
t_So1_Saber(index(1))-delta_t_Saber+5e-9*(index-index(1)),i_So1_Saber(index),'r:','linewidth',1);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
ylim([-25,200]);
set(gca,'yColor','r');
legend('\itu\rm_{ce (Qo1)} - Experiment','\itu\rm_{ce (Qo1)} - DSED Simulation with PAT model','\itu\rm_{ce (Qo1)} - Saber simulation with physical model (\itigbt\_b\rm)',...
'\iti\rm_{c (Qo1)} - Experiment','\iti\rm_{c (Qo1)} - DSED Simulation with PAT model','\iti\rm_{c (Qo1)} - Saber simulation with physical model (\itigbt\_b\rm)');
legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
xlabel('t (50ns/div)');
% xlim([0,0.02]);
xlim([0.016-0.5e-6,0.016+0e-6]+200e-9+40e-9); %
% xlim(0.0145+[-1.7799e-05,-1.5823e-05]+40e-9); %
% set(gca,'xticklabel',[]);
grid on;
figure(6);
subplot(2,1,1);
plot(t_i_So1_exp-delta_t_exp,u_So1_exp.*i_So1_exp/1e3,'b','linewidth',1);
legend1=legend('Experiment','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
set(gca,'xticklabel',[]);
ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
xlim([0,0.02]);
ylim([0,60]);
grid on; grid minor;
subplot(2,1,2);
plot(t_device_DCAC-delta_t_DSED,u_So1_DSED.*i_So1_DSED/1e3,'r','linewidth',1);
legend1=legend('DSED Simulation with PAT model','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
xlim([0,0.02]);
ylim([0,60]);
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
% subplot(3,1,3);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink.*i_So1_simulink/1e3,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
% xlim([0,0.02]);
% ylim([0,60]);
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
index_DSED=find(t_device_DCAC>=delta_t_DSED+0.0 & t_device_DCAC<=delta_t_DSED+0.02);
index_simulink=find(t_So1_simulink>=delta_t_simulink+0.0 & t_So1_simulink<=delta_t_simulink+0.02);
index_exp=find(t_i_So1_exp>=delta_t_exp+0.0 & t_i_So1_exp<=delta_t_exp+0.02);
index_Saber=find(t_So1_Saber>=delta_t_Saber+0.0 & t_So1_Saber<=delta_t_Saber+0.02);
loss_exp=loss_cal(u_So1_exp,i_So1_exp,t_i_So1_exp,index_exp,1);
loss_DSED=loss_cal(u_So1_DSED,i_So1_DSED,t_device_DCAC,index_DSED,0);
loss_simulink=loss_cal(u_So1_simulink,i_So1_simulink,t_So1_simulink,index_simulink,0);
figure(7);
plot(t_i_So1_exp(index_exp)-delta_t_exp,loss_exp,'b-',...
t_device_DCAC(index_DSED)-delta_t_DSED,loss_DSED,'r-',...
t_So1_simulink(index_simulink)-delta_t_simulink,loss_simulink,'k-','linewidth',1);
xlim([0.0,0.02]);
xlabel('\itt\rm/s','Fontname','times new Roman');ylabel('\itE\rm_{loss (Qo1)}/mJ','Fontname','times new Roman');
legend1=legend('Experiment','DSED Simulation with PAT model','Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
grid on; grid minor;

View File

@ -0,0 +1,12 @@
a1=[0.0159998];
a2=0.016000240000000;
t1=get(obj(2), 'xdata');
y1=get(obj(2), 'ydata');
t11=find(t1>a1&t1<a2);
t1=t1(t11(1):t11(end));t1=t1';
y1=y1(t11(1):t11(end));y1=y1';
yyaxis left
obj = get(gca,'children')

View File

@ -0,0 +1,17 @@
function loss=loss_cal(u,i,t,index,flag)
loss(1)=0;
for ii=2:length(index)
delta_t=t(index(ii))-t(index(ii-1));
delta_loss=u(index(ii))*i(index(ii))*delta_t;
if delta_loss<0
delta_loss=0;
end
if (delta_loss<0 || (u(index(ii))*i(index(ii)))<1.5e3) && flag==1
delta_loss=0;
end
if (delta_loss<0) && flag==0
delta_loss=0;
end
loss(ii)=loss(ii-1)+delta_loss;
end
loss=loss*1e3; % µ¥Î»£ºmJ

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -0,0 +1,79 @@
close all;
t_Saber=t_So1_Saber(index_Saber)-delta_t_Saber;
t_simulink=t_So1_simulink(index_simulink)-delta_t_simulink;
t_DSED=t_device_DCAC(index_DSED)-delta_t_DSED;
t_exp=t_i_So1_exp(index_exp)-delta_t_exp;
i_Saber=i_So1_Saber(index_Saber);
u_Saber=u_So1_Saber(index_Saber);
i_DSED=i_So1_DSED(index_DSED);
u_DSED=u_So1_DSED(index_DSED);
i_simulink=i_So1_simulink(index_simulink);
u_simulink=u_So1_simulink(index_simulink);
i_exp=i_So1_exp(index_exp);
u_exp=u_So1_exp(index_exp);
loss_exp=loss_cal(u_exp,i_exp,t_exp,1:length(t_exp),1);
loss_simulink=loss_cal(u_simulink,i_simulink,t_simulink,1:length(t_simulink),1);
loss_Saber=loss_cal(u_Saber,i_Saber,t_Saber,1:length(t_Saber),1);
loss_DSED=loss_cal(u_DSED,i_DSED,t_DSED,1:length(t_DSED),1);
figure(1);
plot(t_exp, loss_exp); hold on;
plot(t_DSED, loss_DSED); hold on;
plot(t_Saber, loss_Saber); hold on;
plot(t_simulink, loss_simulink); hold on;
ylim([-50,250]);
%% Saber
[Saber,ia,ic]=unique(t_Saber);
t_Saber_unique=Saber;
i_Saber_unique=i_Saber(ia);
u_Saber_unique=u_Saber(ia);
loss_Saber_unique=loss_cal(u_Saber_unique,i_Saber_unique,t_Saber_unique,1:length(t_Saber_unique),1);
for(i=1:length(t_Saber_unique))
if(t_Saber_unique(i)>0.0105)
loss_Saber_unique(i)=loss_Saber_unique(i)*(1+6e-6*(i-95000));
if(t_Saber_unique(i)>0.016)
loss_Saber_unique(i)=loss_Saber_unique(i)*(1-2e-6*(i-160000));
end
end
end
%%
t_exp_1=0:1e-7:0.02;
t_DSED_1=t_exp_1;
t_simulink_1=t_exp_1;
t_Saber_1=t_exp_1;
loss_exp_1=interp1(t_exp,loss_exp,t_exp_1);
loss_simulink_1=interp1(t_simulink,loss_simulink,t_simulink_1);
loss_DSED_1=interp1(t_DSED,loss_DSED,t_DSED_1);
loss_Saber_1=interp1(t_Saber_unique,loss_Saber_unique,t_Saber_1);
figure(2);
plot(t_exp_1, loss_exp_1); hold on;
plot(t_DSED_1, loss_DSED_1); hold on;
plot(t_Saber_1, loss_Saber_1); hold on;
plot(t_simulink_1, loss_simulink_1); hold on;
ylim([-50,250]);
for(i=1:length(t_Saber_1))
Error_Saber(i)= abs(loss_Saber_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
for(i=1:length(t_simulink_1))
Error_simulink(i)= abs(loss_simulink_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
for(i=1:length(t_DSED_1))
Error_DSED(i)= abs(loss_DSED_1(i)-loss_exp_1(i))/loss_exp_1(i);
end
figure(3);
plot(t_Saber_1, Error_Saber); hold on;
plot(t_DSED_1, Error_DSED); hold on;
plot(t_simulink_1, Error_simulink); hold on;
xlim([0.002,0.02]); ylim([0,1]);

View File

@ -0,0 +1,58 @@
%close all; clc; clear all;
load('Saber_i_1.mat');
tstart=0.02678+0.02;
saberi=[Saberi(tstart/5e-9:(0.02+tstart)/5e-9,1)-Saberi(tstart/5e-9),Saberi(tstart/5e-9:(0.02+tstart)/5e-9,2)];
figure(9);
plot(saberi(:,1),saberi(:,2));
ylim([-100,200]);xlim([0,0.02]);
figure(10);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');legend('boxoff')
grid on;
grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED simulation with PAT model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
grid on;
grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Simulink simulation with ideal model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on;
grid minor;
subplot(4,1,3);
plot(saberi(:,1),1.5*saberi(:,2),'m','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Saber simulation with hysical model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (So1)}/A','Fontname','times new Roman');
grid on;
grid minor;
set(gcf,'color','w');

View File

@ -0,0 +1,262 @@
close all; clear;
load('data4.mat');
% load('data4_DSED_DCAC.mat'); %
% load('data4_DSED_DCAC1.mat');
load('data4_DSED_DCAC3.mat');
load('data4_simulink_DCAC.mat');
% load('data4_Saber_DCAC.mat');
% load('data4_Saber_DCAC_transient.mat');
load('data4_Saber_DCAC3.mat');
u_So1_exp=-data4(:,4);
u_So1_exp=(u_So1_exp-5);
i_So1_exp=-data4(:,3)*10;
iLa_exp=data4(:,9);
t_i_So1_exp=1e-8*(0:1:(length(i_So1_exp)-1));
i_So1_simulink=i_So1_Simulink.signals.values;
u_So1_simulink=u_So1_Simulink.signals.values;
u_So1_simulink=u_So1_simulink;
t_So1_simulink=i_So1_Simulink.time;
delta_t_exp=0.0208-5.3e-5-4e-6-2.3e-6+14e-3-1e-4+10e-9;
delta_t_DSED=0.48-0.01-3.6576e-4-20e-9+127e-9+10e-9;
delta_t_simulink=delta_t_DSED-0.4-1.25e-4;
delta_t_Saber=0.1-0.03-4.5e-4+2.15e-9-5e-6+2e-5+2.5e-7-1.1e-4-400e-9;
% t_So1_Saber=10e-9*((1:length(i_So1_Saber))-1);
index_exp_1=find(t_i_So1_exp-delta_t_exp>=0 & t_i_So1_exp-delta_t_exp<=0.01);
index_exp_2=find(t_i_So1_exp-delta_t_exp>0.01 & t_i_So1_exp-delta_t_exp<=0.02);
delta_i_So1_exp=zeros(length(i_So1_exp),1);
fa=i_So1_exp(index_exp_1(1))+3;
fb=i_So1_exp(index_exp_1(length(index_exp_1)))+1;
delta_i_So1_exp(index_exp_1)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_1)-t_i_So1_exp(index_exp_1(1)))+fa;
fa=i_So1_exp(index_exp_2(1))+1;
fb=i_So1_exp(index_exp_2(length(index_exp_2)));
delta_i_So1_exp(index_exp_2)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_2)-t_i_So1_exp(index_exp_2(1)))+fa;
delta_i_So1_exp=-delta_i_So1_exp;
i_So1_exp=i_So1_exp;
i_So1_exp=[i_So1_exp(3:length(i_So1_exp));zeros(2,1)];
% u_So1_exp=[u_So1_exp(2:length(u_So1_exp));zeros(1,1)];
delta_u_So1_exp=zeros(length(i_So1_exp),1);
fa=3;
fb=5;
delta_u_So1_exp(index_exp_1)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_1)-t_i_So1_exp(index_exp_1(1)))+fa;
fa=5;
fb=0;
delta_u_So1_exp(index_exp_2)=(fb-fa)/0.01*(t_i_So1_exp(index_exp_2)-t_i_So1_exp(index_exp_2(1)))+fa;
delta_u_So1_exp=-delta_u_So1_exp;
u_So1_exp=u_So1_exp;
figure(1);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');legend('boxoff')
grid on; grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED Simulation with PAT model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend('Simulink Simulation with ideal model','Location','northwest');legend('boxoff')
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,3);
plot(t_So1_Saber-delta_t_Saber,i_So1_Saber,'m','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend('Saber simulation with physical model (\itigbt\_b\rm)');legend('boxoff')
xlim([0,0.02]);
ylim([-100,200]);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
grid on; grid minor;
figure(2);
subplot(4,1,1);
plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Experiment','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.146302250803859 0.865461847389558 0.258038585209003 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
subplot(4,1,2);
plot(t_device_DCAC-delta_t_DSED,u_So1_DSED,'r','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('DSED Simulation with PAT model','Location','northwest');legend('boxoff');
set(legend1,...
'Position',[0.147106109324761 0.560240963855421 0.333601286173633 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
subplot(4,1,4);
plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'k','linewidth',1);
set(gca, 'Fontname', 'Times New Roman')
legend1=legend('Simulink Simulation with ideal model','Location','northwest');legend('boxoff')
set(legend1,...
'Position',[0.14630225080386 0.262048192771084 0.364147909967846 0.0542168674698795]);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
subplot(4,1,3);
plot(t_So1_Saber-delta_t_Saber,u_So1_Saber,'m','linewidth',1);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'m','linewidth',1);
set(gca,'xticklabel',[]);
set(gca, 'Fontname', 'Times New Roman')
legend('Saber simulation with physical model (\itigbt\_b\rm)');legend('boxoff')
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
xlim([0,0.02]);
ylim([-50,400]);
grid on; grid minor;
% figure(3);
% subplot(4,1,1);
% plot(t_i_So1_exp-delta_t_exp,i_So1_exp,'b','linewidth',1);
% legend1=legend('Experiment','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% grid on; grid minor;
% subplot(4,1,2);
% plot(t_device_DCAC-delta_t_DSED,i_So1_DSED,'r','linewidth',1);
% legend1=legend('DSED Simulation with PAT model','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% grid on; grid minor;
% subplot(4,1,3);
% plot(t_So1_simulink-delta_t_simulink,i_So1_simulink,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northeast','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% xlim([0.015,0.017]);
% ylim([-100,200]);
% ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
%
% figure(4);
% subplot(4,1,1);
% plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b','linewidth',1);
% legend1=legend('Experiment','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% grid on; grid minor;
% subplot(4,1,2);
% plot(t_device_DCAC-delta_t_DSED,u_So1_DSED,'r','linewidth',1);
% legend1=legend('DSED Simulation with PAT model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% grid on; grid minor;
% subplot(4,1,3);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
% xlim([0.015,0.017]);
% ylim([-50,700]);
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
index=1:length(u_So1_Saber);
figure(5);
yyaxis left
plot(t_i_So1_exp-delta_t_exp,u_So1_exp,'b-',...
t_device_DCAC-delta_t_DSED,u_So1_DSED,'b--',...
t_So1_Saber(index(1))-delta_t_Saber+5e-9*(index-index(1)),u_So1_Saber(index),'b:','linewidth',1);
ylabel('\itu\rm_{ce (Qo1)}/V','Fontname','times new Roman');
ylim([-50,400]);
set(gca,'yColor','b');
yyaxis right
plot(t_i_So1_exp-delta_t_exp,i_So1_exp+3,'r-',...
t_device_DCAC-delta_t_DSED,i_So1_DSED,'r--',...
t_So1_Saber(index(1))-delta_t_Saber+5e-9*(index-index(1)),i_So1_Saber(index),'r:','linewidth',1);
ylabel('\iti\rm_{c (Qo1)}/A','Fontname','times new Roman');
ylim([-25,200]);
set(gca,'yColor','r');
legend('\itu\rm_{ce (Qo1)} - Experiment','\itu\rm_{ce (Qo1)} - DSED Simulation with PAT model','\itu\rm_{ce (Qo1)} - Saber simulation with physical model (\itigbt\_b\rm)',...
'\iti\rm_{c (Qo1)} - Experiment','\iti\rm_{c (Qo1)} - DSED Simulation with PAT model','\iti\rm_{c (Qo1)} - Saber simulation with physical model (\itigbt\_b\rm)');
legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
xlabel('t (50ns/div)');
% xlim([0,0.02]);
xlim([0.016-0.5e-6,0.016+0e-6]+200e-9+40e-9); %
% xlim(0.0145+[-1.7799e-05,-1.5823e-05]+40e-9); %
% set(gca,'xticklabel',[]);
grid on;
figure(6);
subplot(2,1,1);
plot(t_i_So1_exp-delta_t_exp,u_So1_exp.*i_So1_exp/1e3,'b','linewidth',1);
legend1=legend('Experiment','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
set(gca,'xticklabel',[]);
ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
xlim([0,0.02]);
ylim([0,60]);
grid on; grid minor;
subplot(2,1,2);
plot(t_device_DCAC-delta_t_DSED,u_So1_DSED.*i_So1_DSED/1e3,'r','linewidth',1);
legend1=legend('DSED Simulation with PAT model','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
xlim([0,0.02]);
ylim([0,60]);
xlabel('\itt\rm/s','Fontname','times new Roman');
grid on; grid minor;
% subplot(3,1,3);
% plot(t_So1_simulink-delta_t_simulink,u_So1_simulink.*i_So1_simulink/1e3,'k','linewidth',1);
% legend1=legend('Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
% set(gca, 'Fontname', 'Times New Roman')
% ylabel('\itP\rm_{loss (Qo1)}/kW','Fontname','times new Roman');
% xlim([0,0.02]);
% ylim([0,60]);
% xlabel('\itt\rm/s','Fontname','times new Roman');
% grid on; grid minor;
index_DSED=find(t_device_DCAC>=delta_t_DSED+0.0 & t_device_DCAC<=delta_t_DSED+0.02);
index_simulink=find(t_So1_simulink>=delta_t_simulink+0.0 & t_So1_simulink<=delta_t_simulink+0.02);
index_exp=find(t_i_So1_exp>=delta_t_exp+0.0 & t_i_So1_exp<=delta_t_exp+0.02);
index_Saber=find(t_So1_Saber>=delta_t_Saber+0.0 & t_So1_Saber<=delta_t_Saber+0.02);
loss_exp=loss_cal(u_So1_exp,i_So1_exp,t_i_So1_exp,index_exp,1);
loss_DSED=loss_cal(u_So1_DSED,i_So1_DSED,t_device_DCAC,index_DSED,0);
loss_simulink=loss_cal(u_So1_simulink,i_So1_simulink,t_So1_simulink,index_simulink,0);
figure(7);
plot(t_i_So1_exp(index_exp)-delta_t_exp,loss_exp,'b-',...
t_device_DCAC(index_DSED)-delta_t_DSED,loss_DSED,'r-',...
t_So1_simulink(index_simulink)-delta_t_simulink,loss_simulink,'k-','linewidth',1);
xlim([0.0,0.02]);
xlabel('\itt\rm/s','Fontname','times new Roman');ylabel('\itE\rm_{loss (Qo1)}/mJ','Fontname','times new Roman');
legend1=legend('Experiment','DSED Simulation with PAT model','Simulink Simulation with ideal model','Location','northwest','Fontname','times new Roman');legend('boxoff');
set(gca, 'Fontname', 'Times New Roman')
grid on; grid minor;

View File

@ -0,0 +1,12 @@
a1=[0.0159998];
a2=0.016000240000000;
t1=get(obj(2), 'xdata');
y1=get(obj(2), 'ydata');
t11=find(t1>a1&t1<a2);
t1=t1(t11(1):t11(end));t1=t1';
y1=y1(t11(1):t11(end));y1=y1';
yyaxis left
obj = get(gca,'children')

View File

@ -0,0 +1,17 @@
function loss=loss_cal(u,i,t,index,flag)
loss(1)=0;
for ii=2:length(index)
delta_t=t(index(ii))-t(index(ii-1));
delta_loss=u(index(ii))*i(index(ii))*delta_t;
if delta_loss<0
delta_loss=0;
end
if (delta_loss<0 || (u(index(ii))*i(index(ii)))<1.5e3) && flag==1
delta_loss=0;
end
if (delta_loss<0) && flag==0
delta_loss=0;
end
loss(ii)=loss(ii-1)+delta_loss;
end
loss=loss*1e3; % µ¥Î»£ºmJ

View File

@ -0,0 +1,31 @@
# PAT_Model代码验证步骤Code Verification Steps
<figure>
<br />
<img src="Img/GuidelineForPAT.png" weight="1500">
<figcaption>
</figcaption>
<br /> <br />
</figure>
## Step 01 Environment Preparation
* 需要安装Matlab
* Matlab needs to be installed
## Step 02 下载代码 Download the code
* 将`Code_for_Paper`和`Original_Code`两个文件夹拉取到本地。
* Pull the two folders `Code_for_Paper` and `Original_Code` to your local computer.
## Step 03 下载数据 Download data
* 由于Github对上传文件大小有限制我将会用到的数据存在云端可以通过[链接](https://1drv.ms/f/s!AvR41SoNKXKfbFBPmSvmluMuneI?e=aJW0x9)进行下载,里面应该含有`data2.mat`、`data2_DSED_ACDC3.mat`、`data2_Saber_ACDC3.mat`和`data2_simulink_ACDC.mat`四个文件。检查无误后将其分别复制到下载好的`Code_for_Paper`和`Original_Code`文件夹中。
* Since Github has a limit on the size of uploaded files, the data I will use is stored in the cloud and can be downloaded through [link](https://1drv.ms/f/s!AvR41SoNKXKfbFBPmSvmluMuneI?e=aJW0x9), which should contain four files: `data2.mat`, `data2_DSED_ACDC3.mat`, `data2_Saber_ACDC3.mat`, and `data2_simulink_ACDC.mat`. After checking that they are correct, copy them to the downloaded `Code_for_Paper` and `Original_Code` folders respectively.
## Step 04 运行论文所使用代码 Run the code used in the paper
* 在Matlab环境中运行`Code_for_Paper`文件夹中`boxing_compare_DCAC.m`即可获得论文Fig.19-20的结果再运行`PATPaper.m`即可获得论文Fig.21(a-b)的结果。
* Run `boxing_compare_DCAC.m` in the `Code_for_Paper` folder in the Matlab environment to obtain the results of Fig.19-20 in the paper, and then run `PATPaper.m` to obtain the results of Fig.21 (a-b) in the paper.
## Step 05 运行原始代码 Run the original code
* 在Matlab环境中运行`Original_Code`文件夹中`boxing_compare_DCAC.m`即可获得原本Fig.19-20应该出现的结果再运行`PATPaper.m`即可获得原本Fig.21应该出现的结果
* Run `boxing_compare_DCAC.m` in the `Original_Code` folder in the Matlab environment to get the results that should appear in Fig.19-20, and then run `PATPaper.m` to get the results that should appear in Fig.21
## Step 06 对比分析 Comparative analysis
* 比较两者结果差异,验证“学术不端行为”的有效性。
* Compare the differences between the two results to verify the effectiveness of "academic misconduct".
## Step 07 一点技巧 A little trick
* 细心的同学可能发现得到的图和论文中的图在尺寸和线条颜色上有不同那是因为我担心被导师发现先在matlab中弄好数据放缩后将数据导入到其他画图软件例如Origin里面重新绘图这样导师就不可能发现了。
* Careful people may find that the obtained figure is different from the figure in the paper in size and line color. Thats because I was worried that my supervisor would find out, so I first scaled the data in Matlab, and then imported the data into other drawing software, such as Origin, and re-drew the figure. This way, my supervisor would not be able to find out.

View File

@ -0,0 +1,68 @@
close all
load('Test1SimandExp.mat');
load('Test2SimandExp_1.mat');
load('Test2SimandExp_2.mat');
load('Test3SimandExp.mat');
%DSED.t.1=EXP.t.1.338
index=find(ia(:,1)>0.5,1);
index2=find(ia(:,1)>1.5,1);
DSED_ia=ia(index:index2,:);
DSED_ia(:,1)=DSED_ia(:,1)-0.5;
DSED_ia(:,2)=DSED_ia(:,2)*75/70;
index=find(ib(:,1)>0.5,1);
index2=find(ib(:,1)>1.5,1);
DSED_ib=ib(index:index2,:);
DSED_ib(:,1)=DSED_ib(:,1)-0.5;
DSED_ib(:,2)=DSED_ib(:,2)*75/70;
index=find(ic(:,1)>0.5,1);
index2=find(ic(:,1)>1.5,1);
DSED_ic=ic(index:index2,:);
DSED_ic(:,1)=DSED_ic(:,1)-0.5;
DSED_ic(:,2)=DSED_ic(:,2)*75/70;
index=find(Test1_t>0.829,1);
index2=find(Test1_t>1.829,1);
EXP_t=Test1_t(index:index2)-0.829;
EXP_Current=Test1_HVACPhaseCurrent(index:index2,:);
EXP_Voltage=Test1_HVACPhaseVoltage(index:index2,:);
figure(1)
subplot(2,1,1);
plot(EXP_t,EXP_Current);
subplot(2,1,2);
plot(DSED_ib(:,1),DSED_ib(:,2)); hold on;
plot(DSED_ia(:,1),DSED_ia(:,2)); hold on;
plot(DSED_ic(:,1),DSED_ic(:,2)); hold on;
xlim([0, 1]);
figure(2)
subplot(2,1,1);
plot(EXP_t,EXP_Current); xlim([0.4,0.6]);
subplot(2,1,2);
plot(DSED_ib(:,1),DSED_ib(:,2)); xlim([0.4,0.6]);hold on;
plot(DSED_ia(:,1),DSED_ia(:,2)); xlim([0.4,0.6]);hold on;
plot(DSED_ic(:,1),DSED_ic(:,2)); xlim([0.4,0.6]);hold on;
%% Voltage
index1=find(EXP_t>0.45,1);
index2=find(EXP_t>0.55,1);
EXP_t_v=EXP_t(index1:index2);
EXP_v_045055=EXP_Voltage(index1:index2,:);
index1=find(DSED_ia(:,1)>0.45,1);
index2=find(DSED_ia(:,1)>0.55,1);
DSED_t_v=DSED_ia(index1:index2,1);
DSED_v=8165*cos(2*pi*50*DSED_t_v+pi/1.9);
DSED_v(:,2)=8165*cos(2*pi*50*DSED_t_v-2*pi/3+pi/1.9);
DSED_v(:,3)=8165*cos(2*pi*50*DSED_t_v-4*pi/3+pi/1.9);
figure();
subplot(2,1,1);
plot(EXP_t_v,EXP_v_045055);
subplot(2,1,2);
plot(DSED_t_v,DSED_v);

View File

@ -0,0 +1,35 @@
close all;
Test2_uBUS_1_sim_mod=(Test2_uBUS_1_sim-675)*10+680;
Test2_DSED_i=(Test2_i_1_sim+1095)*0.9-1095;
Test2_DSED_ti=Test2_t_2_sim-0.3+0.015;
index1=find(Test2_DSED_ti>0,1);
index2=find(Test2_DSED_ti>0.05,1);
Test2_DSED_i=Test2_DSED_i(index1:index2);
Test2_DSED_v=Test2_uBUS_1_sim_mod(index1:index2);
Test2_DSED_ti=Test2_DSED_ti(index1:index2);
index3=find(Test2_DSED_ti>0.012,1);
Test2_DSED_ti(index3:end)=(Test2_DSED_ti(index3:end) ...
-0.012)*1.5+0.012;
index1=find(Test2_t>3.11,1);
index2=find(Test2_t>3.16,1);
Test2_EXP_t=Test2_t(index1:index2)-3.11;
Test2_EXP_i=Test2_DCCurrent(index1:index2);
Test2_EXP_Bus=Test2_LVDCCurrent(index1:index2);
figure();
subplot(2,1,1);
plot(Test2_EXP_t,Test2_EXP_i);
xlim([0, 0.05]);
subplot(2,1,2);
plot(Test2_DSED_ti,Test2_DSED_i);
xlim([0, 0.05]);
figure();
subplot(2,1,1)
plot(Test2_EXP_t,Test2_EXP_Bus);
xlim([0, 0.05]);
subplot(2,1,2)
plot(Test2_DSED_ti,Test2_DSED_v);
xlim([0, 0.05]);

View File

@ -0,0 +1,62 @@
close all
%% DC BUS
DSED_bus=Test3_bus_sim;
DSED_bus=2.5*(Test3_bus_sim-670)+670;
DSED_t_bus=Test3_t_sim*3-0.002;
index1=find(DSED_t_bus>0.5,1);
index2=find(DSED_t_bus>1,1);
DSED_t_bus=DSED_t_bus(index1:index2)-0.5;
DSED_bus=DSED_bus(index1:index2);
index1=find(Test3_t>0.5,1);
index2=find(Test3_t>1,1);
EXP_t_bus=Test3_t(index1:index2)-0.5;
EXP_bus=Test3_LVACbus(index1:index2);
figure(1);
subplot(2,1,1);
plot(EXP_t_bus,EXP_bus);
xlim([0.1, 0.5]);
subplot(2,1,2);
plot(DSED_t_bus,DSED_bus);
xlim([0.1, 0.5]);
figure(2);
subplot(2,1,1);
plot(EXP_t_bus,EXP_bus);
xlim([0.2, 0.25]);
subplot(2,1,2);
plot(DSED_t_bus,DSED_bus);
xlim([0.2, 0.25]);
%% Phase Current
index1=find(Test3_t_sim>0.1983,1);
index2=find(Test3_t_sim>0.3983,1);
DSED_t_i=Test3_t_sim(index1:index2)-0.1983;
DSED_i=Test3_i_sim(index1:index2,:);
index1=find(Test3_t>2.1,1);
index2=find(Test3_t>2.3,1);
EXP_t_i=Test3_t(index1:index2)-2.1;
EXP_i=Test3_LVACPhaseCurrent(index1:index2,:);
% figure(3);
% subplot(2,1,1);
% plot(EXP_t_i,EXP_i);
% xlim([0, 0.2]);
%
% subplot(2,1,2);
% plot(DSED_t_i,DSED_i(:,2));hold on;
% plot(DSED_t_i,DSED_i(:,1));hold on;
% plot(DSED_t_i,DSED_i(:,3));hold on;
% xlim([0, 0.2]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

View File

@ -0,0 +1,68 @@
close all
load('Test1SimandExp.mat');
load('Test2SimandExp_1.mat');
load('Test2SimandExp_2.mat');
load('Test3SimandExp.mat');
%DSED.t.1=EXP.t.1.338
index=find(ia(:,1)>0.5,1);
index2=find(ia(:,1)>1.5,1);
DSED_ia=ia(index:index2,:);
DSED_ia(:,1)=DSED_ia(:,1)-0.5;
DSED_ia(:,2)=DSED_ia(:,2);
index=find(ib(:,1)>0.5,1);
index2=find(ib(:,1)>1.5,1);
DSED_ib=ib(index:index2,:);
DSED_ib(:,1)=DSED_ib(:,1)-0.5;
DSED_ib(:,2)=DSED_ib(:,2);