1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| % --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
nomfichier=get(handles.edit1,'String');
feuillecalcul=get(handles.edit2,'String');
temps=get(handles.edit3,'String');
torque=get(handles.edit4,'String');
% Lecture des fichiers
handles.t = xlsread(nomfichier,feuillecalcul,temps);
handles.torque = xlsread(nomfichier,feuillecalcul,torque);
for i=1:1:length(handles.torque)
if (handles.torque(i,1)<0);
handles.torque1(i,1)=-handles.torque(i,1);
else (handles.torque(i,1)>=0);
handles.torque1(i,1)=handles.torque(i,1);
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paramètres permettant le calcul des pertes %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
handles.Vceo=1.05; %Tension de seuil entre collecteur et emetteur IGBT
handles.Rce=3.2E-03; %Resistance entre collecteur et emetteur IGBT
handles.Vt=0.9; %Tension de seuil de la diode
handles.Rt=3E-03; %Resistance de la diode
handles.alpha=0.67; %Rapport cyclique
[t,pertediode,t,torque1]=sim('calculperte')
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) |
Partager