Skip to content

Commit fcaf193

Browse files
author
Angel Gonzalez
committed
feat: add new lab loss types Banding_Loss, Sleeve_Loss, and Stator_Copper_Loss_AC
1 parent 338ec38 commit fcaf193

File tree

9 files changed

+40
-6
lines changed

9 files changed

+40
-6
lines changed

GenerateSimulinkThermalModel.mlx

22 Bytes
Binary file not shown.

ValidateSimulinkThermalModel.mlx

-1 Bytes
Binary file not shown.

data/OutputFromGSTM.mat

647 Bytes
Binary file not shown.

interface/+mcadinterface/ThermalInterface.m

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef ThermalInterface < mcadinterface.BasicInterface
22
%THERMALINTERFACE Motor-CAD interface for thermal modeling workflows.
33

4-
% Copyright 2022-2023 The MathWorks, Inc.
4+
% Copyright 2022-2025 The MathWorks, Inc.
55

66
properties(SetAccess=protected)
77
workingDirectory % Working directory
@@ -29,6 +29,9 @@
2929
Iron_Loss_Rotor_Tooth_Mat (:,:) double % Rotor tooth iron loss map [W]
3030
Friction_Loss_Mat (:,:) double % Friction loss map [W]
3131
Windage_Loss_Mat (:,:) double % Windage loss map [W]
32+
Stator_Copper_Loss_AC_Mat (:,:) double % Stator copper AC loss map [W]
33+
Banding_Loss_Mat (:,:) double % Banding loss map [W]
34+
Sleeve_Loss_Mat (:,:) double % Windage loss map [W]
3235

3336
% Thermal matrices
3437

@@ -481,6 +484,21 @@ function updateLabLossTables(obj)
481484
else % this machine type does not include this loss type
482485
Windage_Loss = zeros(size(Speed));
483486
end
487+
if isfield(outLoad, 'Stator_Copper_Loss_AC')
488+
Stator_Copper_Loss_AC = outLoad.Stator_Copper_Loss_AC;
489+
else % this machine type does not include this loss type
490+
Stator_Copper_Loss_AC = zeros(size(Speed));
491+
end
492+
if isfield(outLoad, 'Banding_Loss')
493+
Banding_Loss = outLoad.Banding_Loss;
494+
else % this machine type does not include this loss type
495+
Banding_Loss = zeros(size(Speed));
496+
end
497+
if isfield(outLoad, 'Sleeve_Loss')
498+
Sleeve_Loss = outLoad.Sleeve_Loss;
499+
else % this machine type does not include this loss type
500+
Sleeve_Loss = zeros(size(Speed));
501+
end
484502

485503
obj.Speed_Mat = Speed;
486504
obj.Shaft_Torque_Mat = Shaft_Torque;
@@ -495,6 +513,9 @@ function updateLabLossTables(obj)
495513
obj.Iron_Loss_Rotor_Tooth_Mat = Iron_Loss_Rotor_Tooth;
496514
obj.Friction_Loss_Mat = Friction_Loss;
497515
obj.Windage_Loss_Mat = Windage_Loss;
516+
obj.Stator_Copper_Loss_AC_Mat = Stator_Copper_Loss_AC;
517+
obj.Banding_Loss_Mat = Banding_Loss;
518+
obj.Sleeve_Loss_Mat = Sleeve_Loss;
498519

499520
end
500521

@@ -803,6 +824,9 @@ function updateLabLossTables(obj)
803824
[~,~,xIron_Loss_Rotor_Tooth_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Iron_Loss_Rotor_Tooth_Mat);
804825
[~,~,xFriction_Loss_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Friction_Loss_Mat);
805826
[~,~,xWindage_Loss_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Windage_Loss_Mat);
827+
[~,~,xStator_Copper_Loss_AC_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Stator_Copper_Loss_AC_Mat);
828+
[~,~,xBanding_Loss_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Banding_Loss_Mat);
829+
[~,~,xSleeve_Loss_Mat] = reInterpolateTable(obj.Shaft_Torque_Mat, obj.Speed_Mat, obj.Sleeve_Loss_Mat);
806830

807831

808832
% Get PowerLossDistributor params
@@ -843,7 +867,10 @@ function updateLabLossTables(obj)
843867
'Iron_Loss_Rotor_Back_Iron_Mat', 'Iron_Loss_Rotor_Back_Iron_Mat', ...
844868
'Iron_Loss_Rotor_Tooth_Mat', 'Iron_Loss_Rotor_Tooth_Mat', ...
845869
'Friction_Loss_Mat', 'Friction_Loss_Mat', ...
846-
'Windage_Loss_Mat', 'Windage_Loss_Mat' ...
870+
'Windage_Loss_Mat', 'Windage_Loss_Mat', ...
871+
'Stator_Copper_Loss_AC_Mat', 'Stator_Copper_Loss_AC_Mat', ...
872+
'Banding_Loss_Mat', 'Banding_Loss_Mat', ...
873+
'Sleeve_Loss_Mat', 'Sleeve_Loss_Mat' ...
847874
);
848875
hInTorque = add_block('simulink/Commonly Used Blocks/In1', strcat(romSubsysPath, '/ShaftTorque_Nm'));
849876
hInSpeed = add_block('simulink/Commonly Used Blocks/In1', strcat(romSubsysPath, '/ShaftSpeed_RPM'));
@@ -943,6 +970,9 @@ function updateLabLossTables(obj)
943970
assignin(mdlWks,'Iron_Loss_Rotor_Tooth_Mat', xIron_Loss_Rotor_Tooth_Mat);
944971
assignin(mdlWks,'Friction_Loss_Mat', xFriction_Loss_Mat);
945972
assignin(mdlWks,'Windage_Loss_Mat', xWindage_Loss_Mat);
973+
assignin(mdlWks,'Stator_Copper_Loss_AC_Mat', xStator_Copper_Loss_AC_Mat);
974+
assignin(mdlWks,'Banding_Loss_Mat', xBanding_Loss_Mat);
975+
assignin(mdlWks,'Sleeve_Loss_Mat', xSleeve_Loss_Mat);
946976
assignin(mdlWks,'TrefStator', TrefStator);
947977
assignin(mdlWks,'TrefRotor', TrefRotor);
948978
assignin(mdlWks,'StatorCopperTempCoefResistivity', xStatorCopperTempCoefResistivity);

libraries/mcadROM_lib.slx

696 Bytes
Binary file not shown.

models/e5_IM_HWJ_ROM.slx

-5.44 KB
Binary file not shown.

models/e8_IPMSM_HWJandVent_ROM.slx

465 Bytes
Binary file not shown.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<Info><Category UUID="FileClassCategory"><Label UUID="design"/></Category></Info>
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info>
3+
<Category UUID="FileClassCategory">
4+
<Label UUID="design" />
5+
</Category>
6+
</Info>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<Info location="OutputFromGSTM.mat" type="File"/>
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info location="OutputFromGSTM.mat" type="File" />

0 commit comments

Comments
 (0)