├── MEAPA+Optimization ├── .DS_Store ├── 1_Design │ ├── .DS_Store │ ├── 1_Misc │ │ ├── .DS_Store │ │ ├── Limits_ASM.m │ │ ├── Limits_PMSM.m │ │ ├── Options_ASM.m │ │ ├── Options_PMSM.m │ │ ├── Reference_ASM.m │ │ └── Reference_PMSM.m │ ├── Design_ASM.m │ └── Design_PMSM.m ├── 2_Analysis │ ├── Analysis_ASM.m │ └── Analysis_PMSM.m ├── 3_Results │ ├── .DS_Store │ ├── 1_Misc │ │ └── Template_results.xlsx │ ├── PMSM_data_20211215_101323 │ │ └── 1_Design │ │ │ ├── Entwurf_PMSM_20211215_101323.mat │ │ │ ├── Entwurf_PMSM_20211215_101323.xlsx │ │ │ └── Geometrie_PMSM_20211215_101323.dxf │ ├── PMSM_data_20211215_105333 │ │ ├── 1_Design │ │ │ ├── Entwurf_PMSM_20211215_105333.mat │ │ │ ├── Entwurf_PMSM_20211215_105333.xlsx │ │ │ └── Geometrie_PMSM_20211215_105333.dxf │ │ └── 2_Analysis │ │ │ └── Analyse_PMSM_20211215_105333.mat │ └── PMSM_data_20211215_115310 │ │ ├── 1_Design │ │ ├── Entwurf_PMSM_20211215_115310.mat │ │ ├── Entwurf_PMSM_20211215_115310.xlsx │ │ └── Geometrie_PMSM_20211215_115310.dxf │ │ └── 2_Analysis │ │ └── Analyse_PMSM_20211215_115310.mat ├── 4_GUI │ ├── .DS_Store │ ├── 1_Misc │ │ ├── .DS_Store │ │ ├── FTM_Logo.png │ │ ├── IPMSM (V-Form).jpg │ │ ├── IPMSM (eingelassen).jpg │ │ ├── IPMSM (tangential).jpg │ │ ├── SPMSM.jpg │ │ └── TUM_Logo.jpeg │ ├── GUI_Analysis.fig │ ├── GUI_Analysis.m │ ├── GUI_Design.fig │ └── GUI_Design.m ├── 5_Material │ ├── .DS_Store │ ├── 1_ElectricalSheet │ │ ├── M250-35A.mat │ │ ├── M800-50A.mat │ │ ├── VACOFLUX 48.mat │ │ └── VACOFLUX 50.mat │ ├── 2_Conductor │ │ ├── Aluminiumcasting.mat │ │ ├── Aluminumwire.mat │ │ └── Copper.mat │ ├── 3_Magnet │ │ ├── VACODYM 238 TP.mat │ │ └── VACOMAX 225 TP.mat │ ├── Template_Conductor.m │ ├── Template_ElectricalSheet.m │ └── Template_Magnet.m ├── 6_Extern │ ├── .DS_Store │ ├── DXFLib_v0.9.1 │ │ ├── aci_color_table.txt │ │ ├── dxf_aci2rgb.m │ │ ├── dxf_close.m │ │ ├── dxf_marker.m │ │ ├── dxf_open.m │ │ ├── dxf_point.m │ │ ├── dxf_polyline.m │ │ ├── dxf_polymesh.m │ │ ├── dxf_primitive.m │ │ ├── dxf_print_layer.m │ │ ├── dxf_print_layertable.m │ │ ├── dxf_print_point.m │ │ ├── dxf_print_seqend.m │ │ ├── dxf_print_vertex.m │ │ ├── dxf_rgb2aci.m │ │ ├── dxf_set.m │ │ ├── dxf_text.m │ │ ├── license.txt │ │ └── readme.txt │ └── spider_plot │ │ ├── license.txt │ │ └── spider_plot.m ├── 7_Doku │ ├── .DS_Store │ ├── Doku_v08 EN.pdf │ ├── Doku_v08.pdf │ └── UpdateVersion.m ├── 8_NSGA-II │ ├── Animation_NSGAII_2D.m │ ├── Animation_NSGAII_3D.m │ ├── PEDS_Auswertung_Design_Variablen_Wolff.m │ ├── callOutputfuns.m │ ├── crossoverOp.m │ ├── doc │ │ └── NGPM manual v1.4.pdf │ ├── evaluate.m │ ├── extractPop.m │ ├── initpop.m │ ├── license.txt │ ├── loadpopfile.m │ ├── mutationOp.m │ ├── ndsort.m │ ├── nsga2.m │ ├── nsgaopt.m │ ├── optimization_Kalt_PMSM.m │ ├── optimization_Kalt_PMSM_objfun.m │ ├── output2file.m │ ├── plotnsga.fig │ ├── plotnsga.m │ ├── populations.txt │ ├── selectOp.m │ ├── statpop.m │ ├── varlimit.m │ └── verifyOpt.m ├── 9_Costmodel Angerer │ ├── Cost Model │ │ ├── Cost Functions │ │ │ ├── Anbauteile_1_Stufe_1_Gang_OD.m │ │ │ ├── Anbauteile_1_Stufen_1_Gang.m │ │ │ ├── Anbauteile_1_Stufen_1_Gang_TS.m │ │ │ ├── Anbauteile_1_Stufen_1_Gang_eTV.m │ │ │ ├── Anbauteile_2_Stufen_1_Gang.m │ │ │ ├── Anbauteile_2_Stufen_1_Gang_OD.m │ │ │ ├── Anbauteile_2_Stufen_1_Gang_TS.m │ │ │ ├── Anbauteile_2_Stufen_1_Gang_eTV.m │ │ │ ├── Anbauteile_2_Stufen_2_Gang.m │ │ │ ├── Anbauteile_2_Stufen_2_Gang_OD.m │ │ │ ├── Anbauteile_2_Stufen_2_Gang_TS.m │ │ │ ├── Anbauteile_2_Stufen_2_Gang_eTV.m │ │ │ ├── Investitionen_GS_ASM_AD.m │ │ │ ├── Investitionen_GS_GT_1_1_AD.m │ │ │ ├── Investitionen_GS_GT_1_1_OD_AD.m │ │ │ ├── Investitionen_GS_GT_1_1_TS_AD.m │ │ │ ├── Investitionen_GS_GT_1_1_eTV_AD.m │ │ │ ├── Investitionen_GS_GT_2_1_AD.m │ │ │ ├── Investitionen_GS_GT_2_1_OD_AD.m │ │ │ ├── Investitionen_GS_GT_2_1_TS_AD.m │ │ │ ├── Investitionen_GS_GT_2_1_eTV_AD.m │ │ │ ├── Investitionen_GS_GT_2_2_AD.m │ │ │ ├── Investitionen_GS_GT_2_2_TS_AD.m │ │ │ ├── Investitionen_GS_GT_2_2_eTV_AD.m │ │ │ ├── Investitionen_GS_PSM_AD.m │ │ │ ├── Investitionen_KS_ASM_AD.m │ │ │ ├── Investitionen_KS_PSM_AD.m │ │ │ ├── Investitionen_PT_ASM_AD.m │ │ │ └── Investitionen_PT_PSM_AD.m │ │ ├── Initialisation_EM.m │ │ └── TotalCost_Motor.m │ ├── Inertness │ │ ├── Inertness_Axle_EM.m │ │ └── SP_EM.m │ ├── Mass Calculation │ │ ├── Mass_EM.m │ │ ├── Mass_controlEM.m │ │ └── inertness_EM.m │ ├── Motor │ │ ├── Cost_Calculation_Motor.m │ │ ├── Length_EM.m │ │ ├── Load_Factor.m │ │ ├── Manufacturing_Cost.m │ │ ├── Maschinegeometry.m │ │ ├── MassCalc_EM.m │ │ ├── MaterialCostCalculation_EM.m │ │ ├── Rotor_Design.m │ │ ├── addons_EM.m │ │ └── calc_Lambda.m │ └── Powertrain_Calculation.m ├── Interface_LDS.m ├── LDS │ ├── .gitattributes │ ├── Driving_Cycles │ │ ├── ARTEMIS.mat │ │ ├── ARTEMIS_ALL.mat │ │ ├── ARTEMIS_RUM.mat │ │ ├── Artemis │ │ │ ├── ARTEMIS.mat │ │ │ ├── Urban.mat │ │ │ ├── motorway.mat │ │ │ └── road.mat │ │ ├── EUROPE_ARTEMIS_MOTORWAY.mat │ │ ├── EUROPE_ARTEMIS_MOTORWAY130.mat │ │ ├── EUROPE_ARTEMIS_MOTORWAY150.mat │ │ ├── EUROPE_ARTEMIS_ROAD.mat │ │ ├── EUROPE_ARTEMIS_URBAN.mat │ │ ├── EUROPE_City.mat │ │ ├── EUROPE_EUDC.mat │ │ ├── EUROPE_NEDC.mat │ │ ├── EUROPE_UDC.mat │ │ ├── JAPAN_10_15_MODE.mat │ │ ├── JAPAN_10_MODE.mat │ │ ├── JAPAN_10_MODE_3.mat │ │ ├── JAPAN_11_MODE.mat │ │ ├── JAPAN_11_MODE_4.mat │ │ ├── JAPAN_15_MODE.mat │ │ ├── REAL_TAXI_1.mat │ │ ├── REAL_TAXI_2.mat │ │ ├── Roborace │ │ │ ├── Berlin2018_tsv_roborace_FormelE_Strecke.mat │ │ │ ├── HK2019_vat.mat │ │ │ ├── Roborace_Berlin.mat │ │ │ ├── berlin2019_vat.mat │ │ │ ├── monteblanco2019_vat.mat │ │ │ └── paris2019_vat.mat │ │ ├── Roborace_Berlin.mat │ │ ├── Roborace_HK.mat │ │ ├── Roborace_Monteblanco.mat │ │ ├── Roborace_Paris.mat │ │ ├── USA_CITY_I.mat │ │ ├── USA_CITY_II.mat │ │ ├── USA_FTP_72.mat │ │ ├── USA_FTP_75.mat │ │ ├── USA_FTP_HIGHWAY.mat │ │ ├── USA_NECC.mat │ │ ├── VEMTaxi │ │ │ ├── VEMTaxi.mat │ │ │ └── VEM_Taxi.mat │ │ ├── VEM_Taxi.mat │ │ ├── VEM_Taxi_ms.mat │ │ └── WLTP_class_3.mat │ ├── Graphical_Evaluation │ │ ├── Archiev │ │ │ ├── Dynamic_Plot_1_Motor.m │ │ │ ├── Dynamic_Plot_2_Motors.m │ │ │ ├── Erstellung_Kennfeld_Darstellung.m │ │ │ ├── Ploterstellen.m │ │ │ └── Ploterstellen_1Motor.m │ │ ├── CreationMapPlot.m │ │ ├── GUI_LDS │ │ │ ├── GUI_LDS.fig │ │ │ └── GUI_LDS.m │ │ ├── dynamicplot_motor.m │ │ └── tumColors.m │ ├── Simulation │ │ ├── RUN_simulation.m │ │ ├── Simulation_Acceleration │ │ │ └── Simulation_acceleration.m │ │ ├── Simulation_Energy_Cons │ │ │ ├── Basic_Functions │ │ │ │ ├── BatteryEfficiency.m │ │ │ │ ├── Calc_Resistance.m │ │ │ │ ├── Calc_Resistance_with_recu.m │ │ │ │ ├── Determination_Distribution.m │ │ │ │ ├── Determination_Gear.m │ │ │ │ ├── Determination_Power.m │ │ │ │ ├── Partition_Gearbox.m │ │ │ │ └── Partition_Torque.m │ │ │ ├── Simulation_2G2M_GM.m │ │ │ ├── Simulation_GM_GM.m │ │ │ ├── Simulation_GM_X.m │ │ │ └── Simulation_energy_consumption.m │ │ └── meanEfficiency.m │ └── Vehicle │ │ ├── Mass_calculation.m │ │ ├── Para_Powertrain │ │ ├── Motor_efficiency │ │ │ ├── GENERATE_motor_efficiency_map.m │ │ │ └── Regrid_map.m │ │ ├── Para_powertrain_2G2M_GM.m │ │ ├── Para_powertrain_GM_GM.m │ │ └── Para_powertrain_GM_X.m │ │ ├── Para_vehicle.m │ │ └── Saved_Vehicles │ │ └── vehicle_eGolf.mat ├── MEAPA_Script.m └── Main.m ├── MEAPA_Machine Design Tool for ASM and PSM ├── .DS_Store ├── 1_Entwurf │ ├── .DS_Store │ ├── 1_Misc │ │ ├── .DS_Store │ │ ├── Beschraenkungen_ASM.m │ │ ├── Beschraenkungen_PMSM.m │ │ ├── Optionen_ASM.m │ │ ├── Optionen_PMSM.m │ │ ├── Richtwerte_ASM.m │ │ └── Richtwerte_PMSM.m │ ├── Entwurf_ASM.m │ └── Entwurf_PMSM.m ├── 2_Analyse │ ├── Analyse_ASM.m │ └── Analyse_PMSM.m ├── 3_Ergebnisse │ ├── .DS_Store │ ├── 1_Misc │ │ └── Vorlage_Ergebnisse.xlsx │ ├── ASM_data_20191216_165706 │ │ └── 1_Entwurf │ │ │ ├── Entwurf_ASM_20191216_165706.mat │ │ │ └── Entwurf_ASM_20191216_165706.xlsx │ ├── ASM_data_20191216_170055 │ │ └── 1_Entwurf │ │ │ ├── Entwurf_ASM_20191216_170055.mat │ │ │ ├── Entwurf_ASM_20191216_170055.xlsx │ │ │ └── Geometrie_ASM_20191216_170055.dxf │ ├── PMSM_data_20191217_145108 │ │ └── 1_Entwurf │ │ │ ├── Entwurf_PMSM_20191217_145108.mat │ │ │ ├── Entwurf_PMSM_20191217_145108.xlsx │ │ │ └── Geometrie_PMSM_20191217_145108.dxf │ ├── PMSM_data_20200207_131510 │ │ └── 1_Entwurf │ │ │ ├── Entwurf_PMSM_20200207_131510.mat │ │ │ ├── Entwurf_PMSM_20200207_131510.xlsx │ │ │ └── Geometrie_PMSM_20200207_131510.dxf │ ├── PMSM_data_20200207_131725 │ │ └── 1_Entwurf │ │ │ ├── Entwurf_PMSM_20200207_131725.mat │ │ │ ├── Entwurf_PMSM_20200207_131725.xlsx │ │ │ └── Geometrie_PMSM_20200207_131725.dxf │ └── PMSM_data_20200207_131749 │ │ ├── 1_Entwurf │ │ ├── Entwurf_PMSM_20200207_131749.mat │ │ ├── Entwurf_PMSM_20200207_131749.xlsx │ │ └── Geometrie_PMSM_20200207_131749.dxf │ │ └── 2_Analyse │ │ ├── KennfeldMaschine_Gesamtwirkungsgrad.mat │ │ └── PMSM_350_5050_8837_800_Kennfeld_Gesamtwirkungsgrad.mat ├── 4_GUI │ ├── .DS_Store │ ├── 1_Misc │ │ ├── .DS_Store │ │ ├── FTM_Logo.png │ │ ├── IPMSM (V-Form).jpg │ │ ├── IPMSM (eingelassen).jpg │ │ ├── IPMSM (tangential).jpg │ │ ├── SPMSM.jpg │ │ └── TUM_Logo.jpeg │ ├── GUI_Analyse.fig │ ├── GUI_Analyse.m │ ├── GUI_Entwurf.fig │ └── GUI_Entwurf.m ├── 5_Materialien │ ├── .DS_Store │ ├── 1_Elektroblech │ │ ├── M250-35A.mat │ │ ├── M800-50A.mat │ │ ├── VACOFLUX 48.mat │ │ └── VACOFLUX 50.mat │ ├── 2_Leiter │ │ ├── Aluminiumdraht.mat │ │ ├── Aluminiumguss.mat │ │ └── Kupfer.mat │ ├── 3_Magnet │ │ ├── VACODYM 238 TP.mat │ │ └── VACOMAX 225 TP.mat │ ├── Vorlage_Elektroblech.m │ ├── Vorlage_Leiter.m │ └── Vorlage_Magnet.m ├── 6_Extern │ ├── .DS_Store │ ├── DXFLib_v0.9.1 │ │ ├── aci_color_table.txt │ │ ├── dxf_aci2rgb.m │ │ ├── dxf_close.m │ │ ├── dxf_marker.m │ │ ├── dxf_open.m │ │ ├── dxf_point.m │ │ ├── dxf_polyline.m │ │ ├── dxf_polymesh.m │ │ ├── dxf_primitive.m │ │ ├── dxf_print_layer.m │ │ ├── dxf_print_layertable.m │ │ ├── dxf_print_point.m │ │ ├── dxf_print_seqend.m │ │ ├── dxf_print_vertex.m │ │ ├── dxf_rgb2aci.m │ │ ├── dxf_set.m │ │ ├── dxf_text.m │ │ ├── license.txt │ │ └── readme.txt │ └── spider_plot │ │ ├── license.txt │ │ └── spider_plot.m ├── 7_Doku │ ├── .DS_Store │ └── UpdateVersion.m ├── MEAPA_Skript.m └── Main.m ├── PMSM Tool ├── Auslegung_PMSM.m ├── Ergebnisse │ └── Vorlage_Ergebnisse.xlsx ├── GUI │ ├── GUI_Auslegung_PMSM.fig │ ├── GUI_Auslegung_PMSM.m │ ├── GUI_Kennfeld_PMSM.fig │ ├── GUI_Kennfeld_PMSM.m │ ├── IPMSM (1-schichtig, radial).jpg │ └── SPMSM (radial).jpg ├── Hilfsfunktionen │ ├── export_excel.m │ ├── ggT_fun.m │ ├── plot_Kennfeld.m │ └── plot_Nut.m ├── Kennfeld_PMSM.m ├── LICENSE ├── Main.m ├── Motormodell │ ├── Motormodell.m │ ├── Optimierung_M.m │ └── Optimierung_i.m └── Verluste_PMSM.m ├── README.md └── README_DesignTool.md /MEAPA+Optimization/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/1_Design/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/1_Misc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/1_Design/1_Misc/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/1_Misc/Limits_ASM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Rated power per pole pair in W 11 | % pos.P_N = [max min (p==8); max min (p==6); ... ; max min (p==1)] 12 | limit.P_N = [1600e3 64e3; 5000e3 1.0e3; 5000e3 1.0e3; 5000e3 1.0e3; 5000e3 1.0e3; 4000e3 1.0e3; 2000e3 1.2e3]; 13 | 14 | % Rated rotational velocity in 1/min 15 | limit.n_N = [Inf 0]; 16 | 17 | % Rated voltage in V 18 | limit.U_N = [Inf 0]; 19 | 20 | % Number of pole pairs 21 | limit.p = [8 6 5 4 3 2 1]; 22 | 23 | % Rated Frequency in Hz 24 | limit.f_N = [Inf 0]; 25 | 26 | % Number of bars 27 | limit.m = [3 3]; -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/1_Misc/Limits_PMSM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | 11 | % Rated power in kW 12 | limit.P_N = [2000e3 0]; 13 | 14 | % Rated rotational speed in 1/min 15 | limit.n_N = [Inf 0]; 16 | 17 | % Rated voltage in V 18 | limit.U_N = [Inf 0]; 19 | 20 | % number of pole pairs 21 | limit.p = [Inf 0]; 22 | 23 | % Rated frequency in Hz 24 | limit.f_N = [Inf 0]; 25 | 26 | % Power factor 27 | limit.cos_phi_N = [1.0 0.7]; 28 | 29 | % Number of bars 30 | limit.m = [3 3]; -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/1_Misc/Options_ASM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | 11 | % Electric sheet materials loading 12 | list = dir('5_Material/1_ElectricalSheet'); 13 | if isempty(list) 14 | Elektroblech_List = [{'-'}]; 15 | else 16 | Elektroblech_List = {}; 17 | for i = 1:length(list) 18 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 19 | Elektroblech_List = [Elektroblech_List, {list(i).name(1:end-4)}]; 20 | end 21 | end 22 | if isempty(Elektroblech_List) 23 | Elektroblech_List = [{'-'}]; 24 | end 25 | end 26 | 27 | % Ladder materials load 28 | list = dir('5_Material/2_Conductor'); 29 | if isempty(list) 30 | Leiter_List = [{'-'}]; 31 | else 32 | Leiter_List = {}; 33 | for i = 1:length(list) 34 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 35 | Leiter_List = [Leiter_List, {list(i).name(1:end-4)}]; 36 | end 37 | end 38 | if isempty(Leiter_List) 39 | Leiter_List = [{'-'}]; 40 | end 41 | end 42 | 43 | % Machine type 44 | opt.Maschinenausfuehrung = [{'Kaefiglaeufer'}];% {'Schleifringlaeufer'}]; 45 | 46 | % Circuit type 47 | opt.Schaltung = [{'Stern'};{'Dreieck'}]; 48 | 49 | % Coil form Stator 50 | opt.Spulenform_Stator = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 51 | 52 | % Coil form Rotor 53 | opt.Spulenform_Rotor = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 54 | 55 | % Groove form Stator 56 | opt.Nutform_Stator = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 57 | 58 | % Groove form Rotor 59 | opt.Nutform_Rotor = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 60 | 61 | % Cooling Stator 62 | opt.Kuehlungsart = [{'Innen- oder Kreislaufkuehlung'};{'Oberflaechenkuehlung'}]; 63 | 64 | % Iron material Stator 65 | opt.Stator_Eisenmaterial.String = Elektroblech_List; 66 | 67 | % Conductor material Stator 68 | opt.Stator_Leitermaterial.String = Leiter_List; 69 | 70 | % Iron material Rotor 71 | opt.Rotor_Eisenmaterial.String = Elektroblech_List; 72 | 73 | % Current material Rotor 74 | opt.Rotor_Leitermaterial.String = Leiter_List; 75 | 76 | % Magnet material Rotor 77 | opt.Rotor_Magnetmaterial.String = [{'-'}]; 78 | 79 | % Mode winding design 80 | opt.Mode_Wicklung = [{'Klassisch'}; {'Optimierung'}; {'Manuell'}]; 81 | 82 | % Optimizatino goal winding 83 | opt.Wicklungstyp = [{'A'}; {'B'}; {'C'}]; 84 | -------------------------------------------------------------------------------- /MEAPA+Optimization/1_Design/1_Misc/Options_PMSM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | 11 | % Electric sheet materials load 12 | list = dir('5_Material/1_ElectricalSheet'); 13 | if isempty(list) 14 | Elektroblech_List = [{'-'}]; 15 | else 16 | Elektroblech_List = {}; 17 | for i = 1:length(list) 18 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 19 | Elektroblech_List = [Elektroblech_List, {list(i).name(1:end-4)}]; 20 | end 21 | end 22 | if isempty(Elektroblech_List) 23 | Elektroblech_List = [{'-'}]; 24 | end 25 | end 26 | 27 | % Conductor materials load 28 | list = dir('5_Material/2_Conductor'); 29 | if isempty(list) 30 | Leiter_List = [{'-'}]; 31 | else 32 | Leiter_List = {}; 33 | for i = 1:length(list) 34 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 35 | Leiter_List = [Leiter_List, {list(i).name(1:end-4)}]; 36 | end 37 | end 38 | if isempty(Leiter_List) 39 | Leiter_List = [{'-'}]; 40 | end 41 | end 42 | 43 | % Magnet Material load 44 | list = dir('5_Material/3_Magnet'); 45 | if isempty(list) 46 | Magnet_List = [{'-'}]; 47 | else 48 | Magnet_List = {}; 49 | for i = 1:length(list) 50 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 51 | Magnet_List = [Magnet_List, {list(i).name(1:end-4)}]; 52 | end 53 | end 54 | if isempty(Magnet_List) 55 | Magnet_List = [{'-'}]; 56 | end 57 | end 58 | 59 | % Machine topology 60 | opt.Maschinenausfuehrung = [{'IPMSM (tangential)'}; {'IPMSM (V-Form)'}; {'IPMSM (eingelassen)'}; {'SPMSM'}]; 61 | 62 | % Circuit 63 | opt.Schaltung = [{'Stern'}; {'Dreieck'}]; 64 | 65 | % Coil form Stator 66 | opt.Spulenform_Stator = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 67 | 68 | % Coil form Rotor 69 | opt.Spulenform_Rotor = [{'-'}]; 70 | 71 | % Slot form Stator 72 | opt.Nutform_Stator = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 73 | 74 | % Slot form Rotor 75 | opt.Nutform_Rotor = [{'-'}]; 76 | 77 | % Cooling Stator 78 | opt.Kuehlungsart = [{'Wasser (direkt)'}; {'Luft (indirekt)'}]; 79 | 80 | % Iron material Stator 81 | opt.Stator_Eisenmaterial.String = Elektroblech_List; 82 | 83 | % Conductor material Stator 84 | opt.Stator_Leitermaterial.String = Leiter_List; 85 | 86 | % Iron material Rotor 87 | opt.Rotor_Eisenmaterial.String = Elektroblech_List; 88 | 89 | % Conductor material Rotor 90 | opt.Rotor_Leitermaterial.String = Leiter_List; 91 | 92 | % Magnet material Rotor 93 | opt.Rotor_Magnetmaterial.String = Magnet_List; 94 | 95 | % Modus winding design 96 | opt.Mode_Wicklung = [{'Klassisch'}; {'Optimierung'}; {'Manuell'}]; 97 | 98 | % Optimization goal winding 99 | opt.Wicklungstyp = [{'A'}; {'B'}; {'C'}]; 100 | -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/1_Misc/Template_results.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/1_Misc/Template_results.xlsx -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_101323/1_Design/Entwurf_PMSM_20211215_101323.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_101323/1_Design/Entwurf_PMSM_20211215_101323.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_101323/1_Design/Entwurf_PMSM_20211215_101323.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_101323/1_Design/Entwurf_PMSM_20211215_101323.xlsx -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/1_Design/Entwurf_PMSM_20211215_105333.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/1_Design/Entwurf_PMSM_20211215_105333.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/1_Design/Entwurf_PMSM_20211215_105333.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/1_Design/Entwurf_PMSM_20211215_105333.xlsx -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/2_Analysis/Analyse_PMSM_20211215_105333.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_105333/2_Analysis/Analyse_PMSM_20211215_105333.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/1_Design/Entwurf_PMSM_20211215_115310.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/1_Design/Entwurf_PMSM_20211215_115310.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/1_Design/Entwurf_PMSM_20211215_115310.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/1_Design/Entwurf_PMSM_20211215_115310.xlsx -------------------------------------------------------------------------------- /MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/2_Analysis/Analyse_PMSM_20211215_115310.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/3_Results/PMSM_data_20211215_115310/2_Analysis/Analyse_PMSM_20211215_115310.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/FTM_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/FTM_Logo.png -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/IPMSM (V-Form).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/IPMSM (V-Form).jpg -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/IPMSM (eingelassen).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/IPMSM (eingelassen).jpg -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/IPMSM (tangential).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/IPMSM (tangential).jpg -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/SPMSM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/SPMSM.jpg -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/1_Misc/TUM_Logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/1_Misc/TUM_Logo.jpeg -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/GUI_Analysis.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/GUI_Analysis.fig -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/GUI_Design.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/GUI_Design.fig -------------------------------------------------------------------------------- /MEAPA+Optimization/4_GUI/GUI_Design.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/4_GUI/GUI_Design.m -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/1_ElectricalSheet/M250-35A.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/1_ElectricalSheet/M250-35A.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/1_ElectricalSheet/M800-50A.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/1_ElectricalSheet/M800-50A.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/1_ElectricalSheet/VACOFLUX 48.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/1_ElectricalSheet/VACOFLUX 48.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/1_ElectricalSheet/VACOFLUX 50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/1_ElectricalSheet/VACOFLUX 50.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/2_Conductor/Aluminiumcasting.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/2_Conductor/Aluminiumcasting.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/2_Conductor/Aluminumwire.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/2_Conductor/Aluminumwire.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/2_Conductor/Copper.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/2_Conductor/Copper.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/3_Magnet/VACODYM 238 TP.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/3_Magnet/VACODYM 238 TP.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/3_Magnet/VACOMAX 225 TP.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/3_Magnet/VACOMAX 225 TP.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/Template_Conductor.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/Template_Conductor.m -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/Template_ElectricalSheet.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Note: To create new files for electrical sheets a struct 11 | % with the entries 12 | % - designation 13 | % - rho_Fe 14 | % - H 15 | % - B 16 | % - mu_r 17 | % - p_vFe_B_vec 18 | % - p_vFe_f_vec 19 | % - p_vFe(columns: p_vFe_f_vec, rows: p_vFe_B_vec) 20 | % must be created (see VACOFLUX 48). Afterwards the 21 | % script must be executed. 22 | 23 | clear data 24 | 25 | %% Source: [xxx] 26 | 27 | % Description 28 | data.Bezeichnung = ''; 29 | 30 | % Density of the sheet material rho_Fe [kg/m^3] 31 | data.rho_Fe = 0; 32 | 33 | % electric steel sheet 34 | % Field strength H [A/m] 35 | data.H = 0; 36 | 37 | % Magnetische Induktion [T] 38 | data.B = 0; 39 | 40 | % Relative permeability [-] 41 | data.mu_r = 0; 42 | 43 | % Frequency [Hz] 44 | data.p_vFe_f_vec = 0; 45 | 46 | % Magnetic induction [T] 47 | data.p_vFe_B_vec = 0; 48 | 49 | % Spec. iron losses [W/kg] 50 | data.p_vFe = 0; 51 | 52 | 53 | %% Data 54 | path = ['5_Material/1_ElectricalSheet/', data.Bezeichnung]; 55 | save(path,'data'); -------------------------------------------------------------------------------- /MEAPA+Optimization/5_Material/Template_Magnet.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/5_Material/Template_Magnet.m -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/6_Extern/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_close.m: -------------------------------------------------------------------------------- 1 | function dxf_close(FID) 2 | %DXF_CLOSE Close DXF file. 3 | % DXF_CLOSE(FID) closes the DXF file opened with DXF_OPEN command. 4 | % 5 | % See also DXF_OPEN 6 | 7 | % Copyright 2010-2011 Grzegorz Kwiatek 8 | % $Revision: 1.1.2 $ $Date: 2011.08.25 $ 9 | 10 | try 11 | fprintf(FID.fid,'0\nENDSEC\n0\nEOF\n'); 12 | fclose(FID.fid); 13 | catch exception 14 | if FID.fid >= 0 15 | fclose(FID.fid); 16 | end 17 | rethrow(exception); 18 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_marker.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_marker(FID, markertype, X, Y, Z, varargin) 2 | %DXF_MARKER Draw a set of markers. 3 | % DXF_MARKER(FID, markertype, X, Y, Z) writes markers into DXF file. 4 | % FID is a valid DXFLIB structure created with DXF_OPEN routine. 5 | % markertype is a valid marker type of the following type: 6 | % 'o' - circle, 7 | % 'x' - x sign, 8 | % '+' - plus sign, 9 | % '^' - triangle. 10 | % X, Y and Z are vectors or matrices of the same size containing 11 | % coordinates of points in 3D space. The default size of marker is 1. 12 | % 13 | % DXF_MARKER(..., SIZE) allows to specify size of marker(s). If SIZE is 14 | % a scalar, all markers have the same size according to the SIZE value 15 | % specified. If SIZE is a matrix of size equal to X, Y or Z, each 16 | % marker is rescaled according to corresponding SIZE value. 17 | % 18 | % See also DXF_POLYLINE, DXF_POINT, DXF_PRIMITIVE. 19 | 20 | % Copyright 2008-2011 Grzegorz Kwiatek 21 | % $Revision: 1.0.3 $ $Date: 2011.11.17 $ 22 | 23 | try 24 | 25 | % align matrices 26 | X=X(:); 27 | Y=Y(:); 28 | Z=Z(:); 29 | 30 | if nargin == 5 31 | SIZE = ones(size(X)); 32 | elseif nargin == 6 33 | SIZE = varargin{1}; 34 | end 35 | 36 | if isscalar(SIZE) 37 | SIZE = SIZE * ones(size(X)); 38 | end 39 | 40 | switch lower(markertype) 41 | case 'o' 42 | for i=1:length(X) 43 | fprintf(FID.fid,'0\n'); 44 | fprintf(FID.fid,'CIRCLE\n'); 45 | dxf_print_layer(FID); 46 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 47 | fprintf(FID.fid,'40\n'); 48 | fprintf(FID.fid,[sprintf('%d',SIZE(i)) '\n']); 49 | end 50 | case 'x' 51 | a = sqrt(2); 52 | for i=1:length(X) 53 | XX = X(i) + [-a -a; a a]*SIZE(i)/2; 54 | YY = Y(i) + [ a -a; -a a]*SIZE(i)/2; 55 | ZZ = Z(i) + [0 0; 0 0]; 56 | dxf_polyline(FID, XX, YY, ZZ); 57 | end 58 | case '+' 59 | for i=1:length(X) 60 | a = SIZE(i) / 2 ; 61 | XX = X(i) + [0 a; 0 -a]; 62 | YY = Y(i) + [-a 0; a 0]; 63 | ZZ = Z(i) + [0 0; 0 0]; 64 | dxf_polyline(FID, XX, YY, ZZ); 65 | end 66 | case '^' 67 | for i=1:length(X) 68 | h = sqrt(3) / 2 * SIZE(i); 69 | a = SIZE(i); 70 | XX = X(i) + [-0.5*a 0 0.5*a -0.5*a]'; 71 | YY = Y(i) + [-h/3 2*h/3 -h/3 -h/3]'; 72 | ZZ = Z(i) + [0 0 0 0]'; 73 | dxf_polyline(FID, XX, YY, ZZ); 74 | end 75 | end 76 | 77 | catch exception 78 | if FID.fid >= 0 79 | fclose(FID.fid); 80 | end 81 | rethrow(exception); 82 | end 83 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_open.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_open(fname) 2 | %DXF_OPEN Open DXF file. 3 | % Fid = DXF_OPEN(fname) opens DXF file for writing and writes the DXF 4 | % file header. The function returns the matlab structure 'Fid' with 5 | % various parameters used later by other drawing functions. One must 6 | % use this structure in the subsequent calls to drawing routines. 7 | % 8 | % REMARKS 9 | % The assumed units are meters. 10 | % 11 | % See also DXF_CLOSE 12 | 13 | % Copyright 2010-2011 Grzegorz Kwiatek 14 | % $Revision: 1.1.4 $ $Date: 2011.11.15 $ 15 | 16 | try 17 | 18 | fid = fopen(fname,'w'); 19 | 20 | % Setup default values. 21 | FID.filename = fname; 22 | FID.fid = fid; 23 | FID.show = false; 24 | FID.dump = true; 25 | 26 | FID.layer = 0; 27 | FID.color = 255; 28 | FID.textheight = 1; 29 | FID.textrotation = 0; 30 | FID.textthickness = 0; 31 | FID.textalignment = 0; 32 | FID.textvalignment = 0; 33 | FID.textextrusion = [0 0 1]; 34 | FID.textobliqueangle = 0; 35 | 36 | fprintf(fid,'0\nSECTION\n'); 37 | fprintf(fid,'2\nHEADER\n'); 38 | fprintf(fid,'9\n$ACADVER\n1\nAC1006\n'); % Default units: meters. 39 | fprintf(fid,'9\n$INSUNITS\n70\n6\n'); % Default units: meters. 40 | fprintf(fid,'0\nENDSEC\n'); 41 | 42 | % Start entities or produce TABLE first. 43 | %if nargin ~= 1 44 | % dxf_layertable(FID, varargin); 45 | %end 46 | 47 | % Dump entities section. 48 | fprintf(FID.fid,'0\nSECTION\n'); 49 | fprintf(FID.fid,'2\nENTITIES\n'); 50 | 51 | catch exception 52 | if FID.fid >= 0 53 | fclose(FID.fid); 54 | end 55 | rethrow(exception); 56 | end 57 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_point.m: -------------------------------------------------------------------------------- 1 | function dxf_point(FID, X, Y, Z, varargin) 2 | %DXF_POINT Store points in DXF file. 3 | % DXF_POINT(FID, X, Y, Z) writes 3D points into DXF file. 4 | % FID is a valid DXFLIB structure created with DXF_OPEN routine. 5 | % X, Y and Z are vectors or matrices of the same size containing 6 | % coordinates of points in 3D space. 7 | % 8 | % DXF_POINT(..., COLOR) where COLOR is either n-by-1 ACI color vector or 9 | % n-by-3 RGB color matrix allows to specify color for each individual 10 | % point. 11 | % 12 | % See also DXF_OPEN, DXF_CLOSE, DXF_RGB2ACI, DXF_ACI2RGB, DXF_POLYLINE. 13 | 14 | % Copyright 2008-2011 Grzegorz Kwiatek 15 | % $Revision: 1.3.0 $ $Date: 2011.11.17 $ 16 | 17 | try 18 | 19 | if nargin == 5 20 | % color information included 21 | C = varargin{1}; 22 | if size(C,2) == 3 23 | C = dxf_rgb2aci(C); 24 | else 25 | throw(MException('dxflib:dxf_point', 'Color vector must be m-by-3 or m-by-1.')); 26 | end 27 | C = C(:); 28 | elseif nargin == 4 29 | else 30 | throw(MException('dxflib:dxf_point', 'Inapropriate number of input arguments.')); 31 | end 32 | 33 | X = X(:); 34 | Y = Y(:); 35 | Z = Z(:); 36 | 37 | if FID.show 38 | set(gca,'NextPlot','add'); 39 | if nargin == 4 40 | % Only one color per whole sequence. 41 | plot3(X,Y,Z,'.','Color',dxf_aci2rgb(FID.color)); 42 | elseif nargin == 5 43 | % Color per point. 44 | scatter3(X,Y,Z,4,dxf_aci2rgb(C)); 45 | end 46 | set(gca,'NextPlot','replace'); 47 | end 48 | 49 | if FID.dump 50 | if nargin == 4 51 | for i=1:length(X) 52 | fprintf(FID.fid,'0\n'); 53 | fprintf(FID.fid,'POINT\n'); 54 | dxf_print_layer(FID); 55 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 56 | end 57 | else 58 | currentcolor = FID.color; 59 | for i=1:length(X) 60 | fprintf(FID.fid,'0\n'); 61 | fprintf(FID.fid,'POINT\n'); 62 | FID.color = C(i); 63 | dxf_print_layer(FID); 64 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 65 | end 66 | FID.color = currentcolor; 67 | end 68 | end 69 | 70 | catch exception 71 | if FID.fid >= 0 72 | fclose(FID.fid); 73 | end 74 | rethrow(exception); 75 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_polyline.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_polyline(FID, X, Y, Z) 2 | %DXF_POLYLINE Store lines in DXF file. 3 | % DXF_POLYLINE(FID, X, Y, Z) writes polylines into DXF file. 4 | % FID is valid DXFLIB structure created with DXF_OPEN routine. 5 | % X, Y and Z are matrices of the same size containing coordinates of 6 | % points for polylines. One separate line per column of matrix is 7 | % drawn. 8 | % 9 | % See also DXF_OPEN, DXF_CLOSE. 10 | 11 | % Copyright 2011 Grzegorz Kwiatek 12 | % $Revision: 1.2.0 $ $Date: 2011.11.17 $ 13 | 14 | try 15 | 16 | if FID.show 17 | line(X,Y,Z,'Color',dxf_aci2rgb(FID.color)); 18 | end 19 | 20 | if FID.dump 21 | for i=1:size(X,2) % for each column! 22 | 23 | fprintf(FID.fid,'0\n'); 24 | fprintf(FID.fid,'POLYLINE\n'); 25 | 26 | dxf_print_layer(FID); 27 | fprintf(FID.fid,'66\n'); % entities follow (not necessary) 28 | fprintf(FID.fid,'1\n'); 29 | dxf_print_point(FID,0,0.0,0.0,0.0); % dummy point before vertices 30 | 31 | % 8 = This is a 3D polyline 32 | % 16 = This is a 3D polygon mesh 33 | % 32 = The polygon mesh is closed in the N direction 34 | % 64 = The polyline is a polyface mesh 35 | 36 | fprintf(FID.fid,'70\n'); 37 | fprintf(FID.fid,'8\n'); 38 | dxf_print_vertex(FID, [X(:,i) Y(:,i) Z(:,i)],32); 39 | dxf_print_seqend(FID); 40 | end % for loop 41 | end 42 | 43 | catch exception 44 | if FID.fid >= 0 45 | fclose(FID.fid); 46 | end 47 | rethrow(exception); 48 | end 49 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_polymesh.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_polymesh(FID, VERTICES, FACES, varargin) 2 | %DXF_POLYMESH Produce DXF polyface mesh from MATLAB patch data. 3 | % DXF_POLYMESH(FID, VERTICES, FACES) creates DXF data of polyface 4 | % mesh based on MATLAB patch data (vertices/faces). 5 | % 6 | % DXF_POLYMESH(..., COLOR) allows to specify color for each FACE. COLOR 7 | % matrix should be of size(FACES,1) (i.e. you can specify only 8 | % per-face color). 9 | % 10 | % See also DXF_POLYLINE. 11 | 12 | % Copyright 2011 Grzegorz Kwiatek 13 | % $Revision: 1.1.0 $ $Date: 2011.11.17 $ 14 | 15 | try 16 | 17 | if FID.show 18 | FVC.faces = FACES; 19 | FVC.vertices = VERTICES; 20 | if nargin == 3 21 | % Show mesh with a constant colour. 22 | FVC.facevertexcdata = repmat(dxf_aci2rgb(FID.color),size(FVC.vertices,1),1); 23 | else 24 | % Show mesh with per-face or per-vertex colouring. 25 | FVC.facevertexcdata = varargin{1}; 26 | end 27 | h = patch(FVC); 28 | %lighting phong; 29 | set(h,'EdgeColor','none'); 30 | %shading interp; 31 | end 32 | 33 | if FID.dump 34 | if nargin == 4 35 | COLOURS = varargin{1}; 36 | end 37 | 38 | fprintf(FID.fid,'0\n'); 39 | fprintf(FID.fid,'POLYLINE\n'); 40 | 41 | dxf_print_layer(FID); 42 | fprintf(FID.fid,'66\n'); % entities follow (not necessary 43 | fprintf(FID.fid,'1\n'); 44 | dxf_print_point(FID,0,0.0,0.0,0.0); % dummy point before vertices 45 | 46 | % 8 = This is a 3D polyline 47 | % 16 = This is a 3D polygon mesh 48 | % 32 = The polygon mesh is closed in the N direction 49 | % 64 = The polyline is a polyface mesh 50 | 51 | fprintf(FID.fid,'70\n'); 52 | fprintf(FID.fid,'64\n'); 53 | 54 | % dump vertices 55 | if nargin == 4 56 | % place for per-vertex colouring, apparently it is not working 57 | % for DXF files. 58 | dxf_print_vertex(FID,VERTICES,128+64); % 64 means polyface mesh. 59 | else 60 | dxf_print_vertex(FID,VERTICES,128+64); 61 | end 62 | 63 | % dump faces 64 | if nargin == 4 65 | % per-face colouring. The size of COLOURS matrix must be the same 66 | % as the size of FACES matrix 67 | dxf_print_vertex(FID, FACES, 128, COLOURS); 68 | else 69 | dxf_print_vertex(FID, FACES, 128); 70 | end 71 | 72 | dxf_print_seqend(FID); 73 | end 74 | catch 75 | fclose(FID.fid); 76 | rethrow(lasterror); 77 | end 78 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_print_layer.m: -------------------------------------------------------------------------------- 1 | function dxf_print_layer(FID) 2 | %DXF_PRINT_LAYER Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2010-2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.3 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'8\n'); % layer, default 0 10 | if isnumeric(FID.layer) 11 | fprintf(FID.fid,'%d\n', FID.layer); 12 | else 13 | fprintf(FID.fid,'%s\n', FID.layer); 14 | end 15 | 16 | % Dump color. 17 | fprintf(FID.fid,'62\n%d\n',FID.color); % color group code. 18 | 19 | catch exception 20 | if FID.fid >= 0 21 | fclose(FID.fid); 22 | end 23 | rethrow(exception); 24 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_print_layertable.m: -------------------------------------------------------------------------------- 1 | function dxf_print_layertable(FID, LAYERS) 2 | %DXF_PRINT_LAYERTABLE Print table containing names of layer. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek 6 | % $Revision: 1.0.0 $ $Date: 2011.11.17 $ 7 | 8 | try 9 | fprintf(FID.fid,'0\n'); 10 | fprintf(FID.fid,'SECTION\n'); 11 | fprintf(FID.fid,'2\n'); 12 | fprintf(FID.fid,'TABLES\n'); 13 | 14 | fprintf(FID.fid,'0\n'); 15 | fprintf(FID.fid,'TABLE\n'); 16 | fprintf(FID.fid,'2\n'); 17 | fprintf(FID.fid,'LAYER\n'); 18 | fprintf(FID.fid,'70\n'); 19 | fprintf(FID.fid,'%d\n', length(LAYERS)+1); 20 | 21 | for i=1:length(LAYERS) 22 | fprintf(FID.fid,'0\n'); 23 | fprintf(FID.fid,'LAYER\n'); 24 | fprintf(FID.fid,'2\n'); 25 | fprintf(FID.fid,'%s\n', LAYERS{i}); % Layer name 26 | fprintf(FID.fid,'70\n'); 27 | fprintf(FID.fid,'64\n'); % Layer flag. 28 | fprintf(FID.fid,'62\n'); 29 | fprintf(FID.fid,'2\n'); % Layer color. 30 | fprintf(FID.fid,'6\n'); 31 | fprintf(FID.fid,'CONTINUOUS\n'); % Layer linetype 32 | end 33 | 34 | fprintf(FID.fid,'0\n'); 35 | fprintf(FID.fid,'ENDTAB\n'); 36 | fprintf(FID.fid,'0\n'); 37 | fprintf(FID.fid,'ENDSEC\n'); 38 | catch exception 39 | if FID.fid >= 0 40 | fclose(FID.fid); 41 | end 42 | error(exception.message); 43 | end 44 | 45 | 46 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_print_point.m: -------------------------------------------------------------------------------- 1 | function dxf_print_point(FID,pointno,x,y,z) 2 | %DXF_PRINT_POINT Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'1%1d\n%1.8g\n2%1d\n%1.8g\n3%1d\n%1.8g\n',pointno,x,pointno,y,pointno,z); 10 | catch exception 11 | if FID.fid >= 0 12 | fclose(FID.fid); 13 | end 14 | rethrow(exception); 15 | end 16 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_print_seqend.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_print_seqend(FID) 2 | %DXF_PRINT_SEQEND Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'0\nSEQEND\n8\n%d\n',FID.layer); 10 | catch exception 11 | if FID.fid >= 0 12 | fclose(FID.fid); 13 | end 14 | rethrow(exception); 15 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_print_vertex.m: -------------------------------------------------------------------------------- 1 | function dxf_print_vertex(FID, VERTICES, vertextype, varargin) 2 | %DXF_PRINT_VERTEX Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | if nargin == 4 10 | % only per-face colouring is accepted. 11 | COLOURS = varargin{1}; 12 | % if COLOURS is (N x 3) matrix, reduce it to ACI colour index table (N x 1). 13 | if size(COLOURS,2) == 3 14 | COLOURS = dxf_rgb2aci(COLOURS); 15 | end 16 | end 17 | 18 | for i=1:size(VERTICES,1) 19 | 20 | fprintf(FID.fid,'0\n'); 21 | fprintf(FID.fid,'VERTEX\n'); 22 | 23 | if vertextype ~= 128 24 | % = 128+64 dump as polyface mesh vertex (called by dxf_polymesh). 25 | % = 32 dump as polyline vertex (called by dxf_polyline) 26 | % Per-vertex colouring does not work for DXF files. 27 | dxf_print_layer(FID); 28 | dxf_print_point(FID,0,VERTICES(i,1),VERTICES(i,2),VERTICES(i,3)); 29 | else 30 | % =128 - dump faces of polyface mesh. 31 | % Setup different per-face colour depending on COLOURS matrix. 32 | currentcolor = FID.color; 33 | if nargin == 4 34 | FID.color = COLOURS(i); 35 | end 36 | dxf_print_layer(FID); 37 | FID.color = currentcolor; 38 | dxf_print_point(FID,0,0,0,0); 39 | end 40 | 41 | % 70 Vertex flags: 42 | % 1 = Extra vertex created by curve-fitting 43 | % 2 = Curve-fit tangent defined for this vertex. A curve-fit tangent direction of 0 may be 44 | % omitted from DXF output but is significant if this bit is set 45 | % 4 = Not used 46 | % 8 = Spline vertex created by spline-fitting 47 | % 16 = Spline frame control point 48 | % 32 = 3D polyline vertex 49 | % 64 = 3D polygon mesh 50 | % 128 = Polyface mesh vertex 51 | 52 | fprintf(FID.fid,'70\n'); 53 | fprintf(FID.fid,'%d\n',vertextype); % layer 54 | 55 | % =128, dump faces of polyface mesh. 56 | if vertextype == 128 57 | fprintf(FID.fid,'71\n'); 58 | fprintf(FID.fid,'%d\n',VERTICES(i,1)); % layer 59 | fprintf(FID.fid,'72\n'); 60 | fprintf(FID.fid,'%d\n',VERTICES(i,2)); % layer 61 | fprintf(FID.fid,'73\n'); 62 | fprintf(FID.fid,'%d\n',VERTICES(i,3)); % layer 63 | if size(VERTICES,2) == 4 64 | fprintf(FID.fid,'74\n'); 65 | fprintf(FID.fid,'%d\n',VERTICES(i,4)); % layer 66 | else 67 | fprintf(FID.fid,'74\n'); 68 | fprintf(FID.fid,'0\n'); % layer 69 | end 70 | end 71 | end 72 | 73 | catch exception 74 | if FID.fid >= 0 75 | fclose(FID.fid); 76 | end 77 | rethrow(exception); 78 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/dxf_set.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_set(FID, varargin) 2 | %DXF_SET Set property. 3 | % DXF_SET(FID, 'PropertyName', 'PropertyValue', ...) sets up property 4 | % in DXF file. 5 | % 6 | % Properties: 7 | % 'Layer' - Layer number, followed by a scalar value in a range 0-256. 8 | % 'Color' - Current color, followed either by a scalar value in a range 9 | % 1-255 (ACI color) or MATLAB color vector [R G B], where 10 | % R,G,B ranges 0-1. [0 0 0] is black, [1 1 1] is white, 11 | % [1 0 0] is pure red, [0 1 0] is pure green and [0 0 1] is 12 | % pure blue. Also ACI value 0 represent BYBLOCK and 256 represent 13 | % BYLAYER (currently both values are not used!) 14 | % 15 | % Copyright 2010-2011 Grzegorz Kwiatek. 16 | % $Revision: 1.1.2 $ $Date: 2011.09.06 $ 17 | 18 | p = inputParser; 19 | p.addRequired('FID', @isstruct); 20 | p.addParamValue('Layer', FID.layer, @(x) ischar(x) || (isnumeric(x) && x > 0) ); 21 | p.addParamValue('Color', FID.color, @(x) (isscalar(x) && x>=0 && x<=256) || (isvector(x) && size(x,1)==1 && size(x,2) ==3) ); 22 | p.addParamValue('TextHeight', FID.textheight, @(x)x >= 0); 23 | p.addParamValue('TextRotation', FID.textrotation, @(x)x >= 0); 24 | p.addParamValue('TextThickness', FID.textthickness, @(x)x >= 0); 25 | p.addParamValue('TextAlignment', FID.textalignment, @(x)x >= 0); 26 | p.addParamValue('TextVAlignment', FID.textvalignment, @(x)x >= 0); 27 | p.addParamValue('TextExtrusion', FID.textextrusion, @(x)(isvector(x) && size(x,1)==1 && size(x,2) ==3)); 28 | p.addParamValue('TextObliqueAngle', FID.textobliqueangle, @(x)x >= 0); 29 | p.parse(FID, varargin{:}); 30 | 31 | FID.layer = p.Results.Layer; 32 | if size(p.Results.Color,2) == 3 33 | FID.color = dxf_rgb2aci(p.Results.Color); 34 | else 35 | FID.color = p.Results.Color; 36 | end 37 | FID.textheight = p.Results.TextHeight; 38 | FID.textrotation = p.Results.TextRotation; 39 | FID.textthickness = p.Results.TextThickness; 40 | FID.textalignment = p.Results.TextAlignment; 41 | FID.textvalignment = p.Results.TextVAlignment; 42 | FID.textextrusion = p.Results.TextExtrusion; 43 | FID.textobliqueangle = p.Results.TextObliqueAngle; 44 | 45 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Grzegorz Kwiatek 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/DXFLib_v0.9.1/readme.txt: -------------------------------------------------------------------------------- 1 | DXFLib 2 | ------------------ 3 | Version 0.9.1 4 | Copyright (c) 2009-2011 Grzegorz Kwiatek, see license.txt file for details. 5 | 6 | Description 7 | ----------- 8 | DXFLib is a simple library written for MATLAB. It allows creating DXF files containing the 9 | following entities: 10 | * Points 11 | * Lines 12 | * Primitives 13 | * Polysurfaces 14 | 15 | The library handles DXF Layers and ACI Colors (RGB colors are converted to ACI counterparts). 16 | 17 | Installation 18 | ------------ 19 | Just unpack m-files to your working directory or create a separate directory and add its location 20 | to MATLAB path. 21 | 22 | Usage 23 | ----- 24 | The easiest is to run dxf_test.m script and then open it in MATLAB editor and compare the generated 25 | DXF files with the code. You'll need any DXF viewer that is capable to handle 3D. I recommend 26 | to use free Bentley View software (http://www.bentley.com/en-US/Products/Bentley+View/). The 27 | advantage of using Bentley View is that this software is capable to PRINT 3-dimensional PDF 28 | files (the examples of DXF/PDF files are included in the library). 29 | 30 | Contact 31 | ------- 32 | Author: Grzegorz Kwiatek, 33 | Mailto: taquart@gmail.com 34 | DXFLib page: http://www.sejsmologia-gornicza.pl/?page_id=172 -------------------------------------------------------------------------------- /MEAPA+Optimization/6_Extern/spider_plot/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Moses 2 | Copyright (c) 2011, David Said 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the distribution 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /MEAPA+Optimization/7_Doku/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/7_Doku/.DS_Store -------------------------------------------------------------------------------- /MEAPA+Optimization/7_Doku/Doku_v08 EN.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/7_Doku/Doku_v08 EN.pdf -------------------------------------------------------------------------------- /MEAPA+Optimization/7_Doku/Doku_v08.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/7_Doku/Doku_v08.pdf -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/Animation_NSGAII_2D.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/Animation_NSGAII_2D.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/Animation_NSGAII_3D.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/Animation_NSGAII_3D.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/PEDS_Auswertung_Design_Variablen_Wolff.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/PEDS_Auswertung_Design_Variablen_Wolff.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/callOutputfuns.m: -------------------------------------------------------------------------------- 1 | function opt = callOutputfuns(opt, state, pop, type) 2 | % Function: opt = callOutputfuns(opt, state, pop, type) 3 | % Description: Call output function(if exist). 4 | % Parameters: 5 | % type : output type. 6 | % -1 = the last call (close file for instance) 7 | % other values(or no exist) = normal output 8 | % 9 | % LSSSSWC, NWPU 10 | % Revision: 1.1 Data: 2011-07-13 11 | %************************************************************************* 12 | 13 | 14 | if(nargin <= 3) 15 | type = 0; % normal output 16 | end 17 | 18 | 19 | if( ~isempty(opt.outputfuns) ) 20 | fun = opt.outputfuns{1}; 21 | opt = fun(opt, state, pop, type, opt.outputfuns{2:end}); 22 | end 23 | 24 | 25 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/crossoverOp.m: -------------------------------------------------------------------------------- 1 | function pop = crossoverOp(opt, pop, state) 2 | % Function: pop = crossoverOp(opt, pop, state) 3 | % Description: Crossover operator. All of the individuals would be do crossover, but 4 | % only "crossoverFraction" of design variables of an individual would changed. 5 | % 6 | % LSSSSWC, NWPU 7 | % Revision: 1.1 Data: 2011-07-13 8 | %************************************************************************* 9 | 10 | %************************************************************************* 11 | % 1. Check for the parameters 12 | %************************************************************************* 13 | % determine the crossover method 14 | strfun = lower(opt.crossover{1}); 15 | numOptions = length(opt.crossover) - 1; 16 | [crossoverOpt{1:numOptions}] = opt.crossover{2:end}; 17 | 18 | switch( strfun ) 19 | case 'intermediate' 20 | fun = @crsIntermediate; 21 | otherwise 22 | error('NSGA2:CrossoverOpError', 'No support crossover operator!'); 23 | end 24 | 25 | nVar = opt.numVar; 26 | 27 | % "auto" crossover fraction 28 | if( ischar(opt.crossoverFraction) ) 29 | if( strcmpi(opt.crossoverFraction, 'auto') ) 30 | fraction = 2.0 / nVar; 31 | else 32 | error('NSGA2:CrossoverOpError', 'The "crossoverFraction" parameter should be scalar or "auto" string.'); 33 | end 34 | else 35 | fraction = opt.crossoverFraction; 36 | end 37 | 38 | 39 | for ind = 1:2:length(pop) % Popsize should be even number 40 | % Create children 41 | [child1, child2] = fun( pop(ind), pop(ind+1), fraction, crossoverOpt ); 42 | 43 | % Round 44 | for v = 1:nVar 45 | if( opt.vartype(v) == 2) 46 | child1.var(v) = round( child1.var(v) ); 47 | child2.var(v) = round( child2.var(v) ); 48 | end 49 | end 50 | 51 | % Bounding limit 52 | child1.var = varlimit(child1.var, opt.lb, opt.ub); 53 | child2.var = varlimit(child2.var, opt.lb, opt.ub); 54 | 55 | pop(ind) = child1; 56 | pop(ind+1) = child2; 57 | 58 | end 59 | 60 | 61 | 62 | function [child1, child2] = crsIntermediate(parent1, parent2, fraction, options) 63 | % Function: [child1, child2] = crsIntermediate(parent1, parent2, fraction, options) 64 | % Description: (For real coding) Intermediate crossover. (Same as Matlab's crossover 65 | % operator) 66 | % child = parent1 + rand * Ratio * ( parent2 - parent1) 67 | % Parameters: 68 | % fraction : crossover fraction of variables of an individual 69 | % options = ratio 70 | % 71 | % LSSSSWC, NWPU 72 | % Revision: 1.1 Data: 2011-07-13 73 | %************************************************************************* 74 | 75 | 76 | if( length(options)~=1 || ~isnumeric(options{1})) 77 | error('NSGA2:CrossoverOpError', 'Crossover operator parameter error!'); 78 | end 79 | 80 | ratio = options{1}; 81 | 82 | child1 = parent1; 83 | child2 = parent2; 84 | 85 | nVar = length(parent1.var); 86 | crsFlag = rand(1, nVar) < fraction; 87 | 88 | randNum = rand(1,nVar); % uniformly distribution 89 | 90 | child1.var = parent1.var + crsFlag .* randNum .* ratio .* (parent2.var - parent1.var); 91 | child2.var = parent2.var - crsFlag .* randNum .* ratio .* (parent2.var - parent1.var); 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/doc/NGPM manual v1.4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/doc/NGPM manual v1.4.pdf -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/evaluate.m: -------------------------------------------------------------------------------- 1 | function [pop, state] = evaluate(opt, pop, state, varargin) 2 | % Function: [pop, state] = evaluate(opt, pop, state, varargin) 3 | % Description: Evaluate the objective functions of each individual in the 4 | % population. 5 | % 6 | % LSSSSWC, NWPU 7 | % Revision: 1.0 Data: 2011-04-20 8 | %************************************************************************* 9 | 10 | N = length(pop); 11 | allTime = zeros(N, 1); % allTime : use to calculate average evaluation times 12 | 13 | %************************************************************************* 14 | % Evaluate objective function in parallel 15 | %************************************************************************* 16 | if( strcmpi(opt.useParallel, 'yes') == 1 ) 17 | if isempty(gcp('nocreate')) 18 | parpool('local',opt.poolsize); 19 | end 20 | % curPoolsize = parpool('size'); 21 | % 22 | % % There isn't opened worker process 23 | % if(curPoolsize == 0) 24 | % if(opt.poolsize == 0) 25 | % parpool open local 26 | % else 27 | % parpool(opt.poolsize) 28 | % end 29 | % % Close and recreate worker process 30 | % else 31 | % if(opt.poolsize ~= curPoolsize) 32 | % parpool close 33 | % parpool(opt.poolsize) 34 | % end 35 | % end 36 | 37 | parfor i = 1:N 38 | fprintf('\nEvaluating the objective function... Generation: %d / %d , Individual: %d / %d \n', state.currentGen, opt.maxGen, i, N); 39 | [pop(i), allTime(i)] = evalIndividual(pop(i), opt.objfun, varargin{:}); 40 | end 41 | 42 | %************************************************************************* 43 | % Evaluate objective function in serial 44 | %************************************************************************* 45 | else 46 | for i = 1:N 47 | fprintf('\nEvaluating the objective function... Generation: %d / %d , Individual: %d / %d \n', state.currentGen, opt.maxGen, i, N); 48 | [pop(i), allTime(i)] = evalIndividual(pop(i), opt.objfun, varargin{:}); 49 | end 50 | end 51 | 52 | %************************************************************************* 53 | % Statistics 54 | %************************************************************************* 55 | state.avgEvalTime = sum(allTime) / length(allTime); 56 | state.evaluateCount = state.evaluateCount + length(pop); 57 | 58 | 59 | 60 | 61 | function [indi, evalTime] = evalIndividual(indi, objfun, varargin) 62 | % Function: [indi, evalTime] = evalIndividual(indi, objfun, varargin) 63 | % Description: Evaluate one objective function. 64 | % 65 | % LSSSSWC, NWPU 66 | % Revision: 1.1 Data: 2011-07-25 67 | %************************************************************************* 68 | 69 | tStart = tic; 70 | [y, cons, dimensions] = objfun( indi.var, varargin{:} ); 71 | evalTime = toc(tStart); 72 | 73 | % Save the objective values and constraint violations 74 | indi.obj = y; 75 | %indi.laenge = dimensions; 76 | indi.dimensions = dimensions; 77 | 78 | if( ~isempty(indi.cons) ) 79 | idx = find( cons ); 80 | if( ~isempty(idx) ) 81 | indi.nViol = length(idx); 82 | indi.violSum = sum( abs(cons) ); 83 | else 84 | indi.nViol = 0; 85 | indi.violSum = 0; 86 | end 87 | end 88 | 89 | 90 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/extractPop.m: -------------------------------------------------------------------------------- 1 | function nextpop = extractPop(opt, combinepop) 2 | % Function: nextpop = extractPop(opt, combinepop) 3 | % Description: Extract the best n individuals in 'combinepop'(population 4 | % size is 2n). 5 | % 6 | % LSSSSWC, NWPU 7 | % Revision: 1.1 Data: 2011-07-12 8 | %************************************************************************* 9 | 10 | popsize = length(combinepop) / 2; 11 | nextpop = combinepop(1:popsize); %just for initializing 12 | 13 | rankVector = vertcat(combinepop.rank); 14 | 15 | n = 0; % individuals number of next population 16 | rank = 1; % current rank number 17 | idx = find(rankVector == rank); 18 | numInd = length(idx); % number of individuals in current front 19 | while( n + numInd <= popsize ) 20 | nextpop( n+1 : n+numInd ) = combinepop( idx ); 21 | 22 | n = n + numInd; 23 | rank = rank + 1; 24 | 25 | idx = find(rankVector == rank); 26 | numInd = length(idx); 27 | end 28 | 29 | % If the number of individuals in the next front plus the number of individuals 30 | % in the current front is greater than the population size, then select the 31 | % best individuals by corwding distance(NSGA-II) or preference distance(R-NSGA-II). 32 | if( n < popsize ) 33 | if(~isempty(opt.refPoints)) 34 | prefDistance = vertcat(combinepop(idx).prefDistance); 35 | prefDistance = [prefDistance, idx]; 36 | prefDistance = sortrows( prefDistance, 1); 37 | idxSelect = prefDistance( 1:popsize-n, 2); % Select the individuals with smallest preference distance 38 | nextpop(n+1 : popsize) = combinepop(idxSelect); 39 | else 40 | distance = vertcat(combinepop(idx).distance); 41 | distance = [distance, idx]; 42 | distance = flipud( sortrows( distance, 1) ); % Sort the individuals in descending order of crowding distance in the front. 43 | idxSelect = distance( 1:popsize-n, 2); % Select the (popsize-n) individuals with largest crowding distance. 44 | nextpop(n+1 : popsize) = combinepop(idxSelect); 45 | end 46 | end 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Song Lin 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/loadpopfile.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/loadpopfile.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/ndsort.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/ndsort.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/nsgaopt.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/nsgaopt.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/optimization_Kalt_PMSM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/optimization_Kalt_PMSM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/optimization_Kalt_PMSM_objfun.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/optimization_Kalt_PMSM_objfun.m -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/plotnsga.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/8_NSGA-II/plotnsga.fig -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/selectOp.m: -------------------------------------------------------------------------------- 1 | function newpop = selectOp(opt, pop) 2 | % Function: newpop = selectOp(opt, pop) 3 | % Description: Selection operator, use binary tournament selection. 4 | % 5 | % LSSSSWC, NWPU 6 | % Revision: 1.1 Data: 2011-07-12 7 | %************************************************************************* 8 | 9 | popsize = length(pop); 10 | pool = zeros(1, popsize); % pool : the individual index selected 11 | 12 | randnum = randi(popsize, [1, 2 * popsize]); 13 | 14 | j = 1; 15 | for i = 1:2:(2*popsize) 16 | p1 = randnum(i); 17 | p2 = randnum(i+1); 18 | 19 | if(~isempty(opt.refPoints)) 20 | % Preference operator (R-NSGA-II) 21 | result = preferenceComp( pop(p1), pop(p2) ); 22 | else 23 | % Crowded-comparison operator (NSGA-II) 24 | result = crowdingComp( pop(p1), pop(p2) ); 25 | end 26 | 27 | if(result == 1) 28 | pool(j) = p1; 29 | else 30 | pool(j) = p2; 31 | end 32 | 33 | j = j + 1; 34 | end 35 | newpop = pop( pool ); 36 | 37 | 38 | 39 | function result = crowdingComp( guy1, guy2) 40 | % Function: result = crowdingComp( guy1, guy2) 41 | % Description: Crowding comparison operator. 42 | % Return: 43 | % 1 = guy1 is better than guy2 44 | % 0 = other cases 45 | % 46 | % LSSSSWC, NWPU 47 | % Revision: 1.0 Data: 2011-04-20 48 | %************************************************************************* 49 | 50 | if((guy1.rank < guy2.rank) || ((guy1.rank == guy2.rank) && (guy1.distance > guy2.distance) )) 51 | result = 1; 52 | else 53 | result = 0; 54 | end 55 | 56 | 57 | 58 | function result = preferenceComp(guy1, guy2) 59 | % Function: result = preferenceComp(guy1, guy2) 60 | % Description: Preference operator used in R-NSGA-II 61 | % Return: 62 | % 1 = guy1 is better than guy2 63 | % 0 = other cases 64 | % 65 | % Copyright 2011 by LSSSSWC 66 | % Revision: 1.0 Data: 2011-07-11 67 | %************************************************************************* 68 | 69 | if( (guy1.rank < guy2.rank) || ... 70 | ((guy1.rank == guy2.rank) && (guy1.prefDistance < guy2.prefDistance)) ) 71 | result = 1; 72 | else 73 | result = 0; 74 | end 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/statpop.m: -------------------------------------------------------------------------------- 1 | function state = statpop(pop, state) 2 | % Function: state = statpop(pop, state) 3 | % Description: Statistic Population. 4 | % 5 | % LSSSSWC, NWPU 6 | % Revision: 1.0 Data: 2011-04-20 7 | %************************************************************************* 8 | 9 | 10 | N = length(pop); 11 | rankVec = vertcat(pop.rank); 12 | rankVec = sort(rankVec); 13 | 14 | state.frontCount = rankVec(N); 15 | state.firstFrontCount = length( find(rankVec==1) ); 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/varlimit.m: -------------------------------------------------------------------------------- 1 | function var = varlimit(var, lb, ub) 2 | % Function: var = varlimit(var, lb, ub) 3 | % Description: Limit the variables in [lb, ub]. 4 | % 5 | % LSSSSWC, NWPU 6 | % Revision: 1.0 Data: 2011-04-20 7 | %************************************************************************* 8 | 9 | numVar = length(var); 10 | for i = 1:numVar 11 | if( var(i) < lb(i) ) 12 | var(i) = lb(i); 13 | elseif( var(i) > ub(i) ) 14 | var(i) = ub(i); 15 | end 16 | end 17 | 18 | -------------------------------------------------------------------------------- /MEAPA+Optimization/8_NSGA-II/verifyOpt.m: -------------------------------------------------------------------------------- 1 | function opt = verifyOpt(opt) 2 | % Function: opt = verifyOpt(opt) 3 | % Description: Verify the optimization model. 4 | % LSSSSWC, NWPU 5 | % Revision: 1.1 Data: 2011-07-15 6 | %************************************************************************* 7 | 8 | 9 | %************************************************************************* 10 | % popsize 11 | %************************************************************************* 12 | if ( mod(opt.popsize, 2) ~= 0 ) 13 | warning('NSGA2:PopSizeError', 'The population size shoud be even number!%d => %d', opt.popsize, opt.popsize+1); 14 | opt.popsize = opt.popsize + 1; 15 | end 16 | 17 | %************************************************************************* 18 | % lb, ub 19 | %************************************************************************* 20 | if( length(opt.lb)~=opt.numVar || length(opt.lb)~=opt.numVar ) 21 | error('NSGA2:OptModelError', 'The numbers of lower and upper bounds(%d,%d) should be equal to the design variable number(%d)!', ... 22 | length(opt.ub), length(opt.lb), opt.numVar); 23 | end 24 | 25 | %************************************************************************* 26 | % vartype 27 | %************************************************************************* 28 | if( length(opt.vartype) ~= opt.numVar ) 29 | warning('NSGA2:OptModelWarning', 'Design variables'' data type error! All the type is set to REAL coding (vartype=1)!'); 30 | opt.vartype = ones(1, opt.numVar); 31 | end 32 | 33 | %************************************************************************* 34 | % nameObj, nameVar, nameCons 35 | %************************************************************************* 36 | if( ~iscell(opt.nameObj) || ~iscell(opt.nameVar) || ~iscell(opt.nameCons)) 37 | error('NSGA2:OptModelError', 'The names of objectives, design variables or constraints should be specified in cell array, for example, {''obj1'',''obj2''}'); 38 | end 39 | 40 | if( (~isempty(opt.nameObj) && length(opt.nameObj)~=opt.numObj) || ... 41 | (~isempty(opt.nameVar) && length(opt.nameVar)~=opt.numVar) || ... 42 | (~isempty(opt.nameCons) && length(opt.nameCons)~=opt.numCons)) 43 | error('NSGA2:OptModelError', 'All names of objectives, design variables or constraints should be specified, if one is specified!'); 44 | end 45 | 46 | %************************************************************************* 47 | % useparallel 48 | %************************************************************************* 49 | if( ~ischar(opt.useParallel) || ... 50 | isempty( find(strcmpi(opt.useParallel, {'yes', 'no'}))) ) 51 | error('NSGA2:OptParamError', 'useParallel can be only "yes" or "no"!'); 52 | end 53 | 54 | %************************************************************************* 55 | % R-NSGA-II parameters 56 | %************************************************************************* 57 | % refPoints 58 | if( ~isempty(opt.refPoints) && size(opt.refPoints,2)~=opt.numObj) 59 | error('NSGA2:OptParamError', 'The reference points has the format refPoints(nPoint, numObj)!'); 60 | end 61 | % refWeight 62 | if( ~isempty(opt.refPoints) && ~isempty(opt.refWeight) && length(opt.refWeight)~=opt.numObj) 63 | error('NSGA2:OptParamError', 'The weight factor vector used in R-NSGA-II must has the length of numObj!'); 64 | end 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_1_Stufe_1_Gang_OD.m: -------------------------------------------------------------------------------- 1 | % Add-on part costs for a single-stage input transmission with open 2 | % differential. 3 | 4 | %Gear 5 | Oel=5; 6 | Dichtungen=4; 7 | Schrauben=2; 8 | Lager=20; 9 | Uebriges=10; 10 | 11 | %Differential 12 | Oel_OD=2; 13 | Dichtungen_OD=2; 14 | Schrauben_OD=2; 15 | Lager_OD=10; 16 | Uebriges_OD=5; 17 | 18 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges+Oel_OD+Dichtungen_OD+Schrauben_OD+Lager_OD+Uebriges_OD; 19 | 20 | clearvars Oel Dichtungen Schrauben Lager Uebriges ... 21 | Oel_OD Dichtungen_OD Schrauben_OD Lager_OD Uebriges_OD -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_1_Stufen_1_Gang.m: -------------------------------------------------------------------------------- 1 | % Mounting part costs for a single-stage input gearbox. 2 | 3 | %Gear 4 | Oel=5; 5 | Dichtungen=4; 6 | Schrauben=2; 7 | Lager=20; 8 | Uebriges=10; 9 | 10 | 11 | 12 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges; 13 | 14 | clearvars Schaltaktuator Lageregelung Oel Dichtungen Schrauben Lager Uebriges ... 15 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_1_Stufen_1_Gang_TS.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_1_Stufen_1_Gang_TS.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_1_Stufen_1_Gang_eTV.m: -------------------------------------------------------------------------------- 1 | % Mounting part costs for a single-stage input transmission with eTV. 2 | 3 | %Gear 4 | Oel=5; 5 | Dichtungen=4; 6 | Schrauben=2; 7 | Lager=20; 8 | Uebriges=10; 9 | 10 | %eTV 11 | Oel_eTV=6; 12 | Dichtungen_eTV=5; 13 | Schrauben_eTV=4; 14 | Lager_eTV=30; 15 | Steuermotor_eTV=90; 16 | Lageregelung_eTV=10; 17 | Uebriges_eTV=35; 18 | 19 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges+Steuermotor_eTV+Lageregelung_eTV+Oel_eTV+Dichtungen_eTV+Schrauben_eTV+Lager_eTV+Uebriges_eTV; 20 | 21 | clearvars Oel Dichtungen Schrauben Lager Uebriges ... 22 | Steuermotor_eTV Lageregelung_eTV Oel_eTV Dichtungen_eTV Schrauben_eTV Lager_eTV Uebriges_eTV 23 | 24 | 25 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_1_Gang.m: -------------------------------------------------------------------------------- 1 | % Attachment costs for a two-stage input transmission with open 2 | % differential. 3 | 4 | %Gear 5 | Oel=6; 6 | Dichtungen=5; 7 | Schrauben=2; 8 | Lager=30; 9 | Uebriges=10; 10 | 11 | 12 | 13 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges; 14 | 15 | clearvars Oel Dichtungen Schrauben Lager Uebriges ... 16 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_1_Gang_OD.m: -------------------------------------------------------------------------------- 1 | % Attachment costs for a two-stage input transmission with open 2 | % differential. 3 | 4 | %Gear 5 | Oel=6; 6 | Dichtungen=5; 7 | Schrauben=2; 8 | Lager=30; 9 | Uebriges=10; 10 | 11 | %Differential 12 | Oel_OD=2; 13 | Dichtungen_OD=2; 14 | Schrauben_OD=2; 15 | Lager_OD=10; 16 | Uebriges_OD=5; 17 | 18 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges+Oel_OD+Dichtungen_OD+Schrauben_OD+Lager_OD+Uebriges_OD; 19 | 20 | clearvars Oel Dichtungen Schrauben Lager Uebriges ... 21 | Oel_OD Dichtungen_OD Schrauben_OD Lager_OD Uebriges_OD -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_1_Gang_TS.m: -------------------------------------------------------------------------------- 1 | % Attachment cost for a two-stage input gearbox with torque splitter. 2 | 3 | %Gear 4 | Oel=6; 5 | Dichtungen=5; 6 | Schrauben=2; 7 | Lager=30; 8 | Uebriges=10; 9 | 10 | %TS 11 | Oel_TS=6; 12 | Dichtungen_TS=4; 13 | Schrauben_TS=3; 14 | Lager_TS=15; 15 | Lamellen_TS=40; 16 | Hydraulik_TS=20; 17 | Uebriges_TS=10; 18 | 19 | Anbauteile=Oel+Dichtungen+Schrauben+Lager+Uebriges+Lamellen_TS+Hydraulik_TS+Oel_TS+Dichtungen_TS+Schrauben_TS+Lager_TS+Uebriges_TS; 20 | 21 | clearvars Oel Dichtungen Schrauben Lager Uebriges ... 22 | Dichtungen_TS Hydraulik_TS Lager_TS Lamellen_TS Oel_TS Schrauben_TS Uebriges_TS 23 | 24 | 25 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_1_Gang_eTV.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_1_Gang_eTV.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_2_Gang.m: -------------------------------------------------------------------------------- 1 | % Mounting part costs for a two-stage two-input transmission with eTV 2 | 3 | %Gear 4 | Oel=7; 5 | Dichtungen=5; 6 | Schrauben=2; 7 | Lager=30; 8 | Schaltaktuator=15; 9 | Lageregelung=10; 10 | Uebriges=12; 11 | 12 | 13 | Anbauteile=Schaltaktuator+Lageregelung+Oel+Dichtungen+Schrauben+Lager+Uebriges; 14 | 15 | clearvars Schaltaktuator Lageregelung Oel Dichtungen Schrauben Lager Uebriges 16 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_2_Gang_OD.m: -------------------------------------------------------------------------------- 1 | % Add-on part costs for a single-stage two-speed transmission with open 2 | % differential. 3 | 4 | %Gear 5 | Oel=7; 6 | Dichtungen=5; 7 | Schrauben=2; 8 | Lager=30; 9 | Schaltaktuator=15; 10 | Lageregelung=10; 11 | Uebriges=12; 12 | 13 | %Differential 14 | Oel_OD=2; 15 | Dichtungen_OD=2; 16 | Schrauben_OD=2; 17 | Lager_OD=10; 18 | Uebriges_OD=5; 19 | 20 | Anbauteile=Schaltaktuator+Lageregelung+Oel+Dichtungen+Schrauben+Lager+Uebriges+Oel_OD+Dichtungen_OD+Schrauben_OD+Lager_OD+Uebriges_OD; 21 | 22 | clearvars Schaltaktuator Lageregelung Oel Dichtungen Schrauben Lager Uebriges ... 23 | Oel_OD Dichtungen_OD Schrauben_OD Lager_OD Uebriges_OD -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_2_Gang_TS.m: -------------------------------------------------------------------------------- 1 | % Add-on part costs for a two-stage multi-speed transmission with torque splitter. 2 | 3 | %Gear 4 | Oel=7; 5 | Dichtungen=5; 6 | Schrauben=2; 7 | Lager=30; 8 | Schaltaktuator=15; 9 | Lageregelung=10; 10 | Uebriges=12; 11 | 12 | %TS 13 | Oel_TS=6; 14 | Dichtungen_TS=4; 15 | Schrauben_TS=3; 16 | Lager_TS=15; 17 | Lamellen_TS=40; 18 | Hydraulik_TS=20; 19 | Uebriges_TS=10; 20 | 21 | Anbauteile=Schaltaktuator+Lageregelung+Oel+Dichtungen+Schrauben+Lager+Uebriges+Lamellen_TS+Hydraulik_TS+Oel_TS+Dichtungen_TS+Schrauben_TS+Lager_TS+Uebriges_TS; 22 | 23 | clearvars Oel Dichtungen Schrauben Lager Uebriges Schaltaktuator Lageregelung ... 24 | Dichtungen_TS Hydraulik_TS Lager_TS Lamellen_TS Oel_TS Schrauben_TS Uebriges_TS 25 | 26 | 27 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Anbauteile_2_Stufen_2_Gang_eTV.m: -------------------------------------------------------------------------------- 1 | % Mounting part costs for a two-stage two-input transmission with eTV 2 | 3 | %Gear 4 | Oel=7; 5 | Dichtungen=5; 6 | Schrauben=2; 7 | Lager=30; 8 | Schaltaktuator=15; 9 | Lageregelung=10; 10 | Uebriges=12; 11 | 12 | %eTV 13 | Oel_eTV=6; 14 | Dichtungen_eTV=5; 15 | Schrauben_eTV=4; 16 | Lager_eTV=30; 17 | Steuermotor_eTV=90; 18 | Lageregelung_eTV=10; 19 | Uebriges_eTV=35; 20 | 21 | Anbauteile=Schaltaktuator+Lageregelung+Oel+Dichtungen+Schrauben+Lager+Uebriges+Steuermotor_eTV+Lageregelung_eTV+Oel_eTV+Dichtungen_eTV+Schrauben_eTV+Lager_eTV+Uebriges_eTV; 22 | 23 | clearvars Schaltaktuator Lageregelung Oel Dichtungen Schrauben Lager Uebriges ... 24 | Steuermotor_eTV Lageregelung_eTV Oel_eTV Dichtungen_eTV Schrauben_eTV Lager_eTV Uebriges_eTV -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_ASM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_ASM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_OD_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_OD_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_TS_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_TS_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_eTV_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_1_1_eTV_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_OD_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_OD_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_TS_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_TS_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_eTV_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_1_eTV_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_TS_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_TS_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_eTV_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_GT_2_2_eTV_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_PSM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_GS_PSM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_KS_ASM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_KS_ASM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_KS_PSM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_KS_PSM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_PT_ASM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_PT_ASM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_PT_PSM_AD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Cost Functions/Investitionen_PT_PSM_AD.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Initialisation_EM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Cost Model/Initialisation_EM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Cost Model/TotalCost_Motor.m: -------------------------------------------------------------------------------- 1 | %model was analytically %designed for quantities between 2,000 and 100,000. 2 | %design. Here, parametric projection according to Ehrlenspiel [99, p. 175] 3 | %for unit numbers up to 2,000,000 whereby a conservative classification was made. 4 | 5 | Kosten_Motor=MK_gesamt+K_Anbauteile+K_Fertigung_EM; 6 | 7 | if Stkzahl<=100000 8 | Kosten_Motor=Kosten_Motor; 9 | elseif Stkzahl>100000 && Stkzahl<=250000 10 | x=(1-0.92)/(100001-250000); 11 | y=1-x*(100001-Stkzahl); 12 | Kosten_Motor=Kosten_Motor*y; 13 | elseif Stkzahl>250000 && Stkzahl<=500000 14 | Kosten_Motor=Kosten_Motor*0.92; 15 | x=(1-0.97)/(250001-500000); 16 | y=1-x*(250001-Stkzahl); 17 | Kosten_Motor=Kosten_Motor*y; 18 | elseif Stkzahl>500000 19 | Kosten_Motor=Kosten_Motor*0.8924; 20 | x=(1-0.92)/(500001-2000000); 21 | y=1-x*(500001-Stkzahl); 22 | Kosten_Motor=Kosten_Motor*y; 23 | end 24 | 25 | 26 | RES.em.K_ges=Kosten_Motor; -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Inertness/Inertness_Axle_EM.m: -------------------------------------------------------------------------------- 1 | function [ Jx, Jy, Jz ] = Inertness_Axle_EM( typ_EM, M_EM_nenn, n_EM_nenn ) 2 | %Inertias of the EM around both main axes, coefficients from 3 | %Regression_InertiaAbout_Major_axes_EM 4 | 5 | p_ASM_Jxz = [7.12413613020974e-05 -0.00152555980563705 0.237307431459897]; %Inertia matrix [kg * m^2] 6 | p_ASM_Jy = [0.000126407875744047 -0.00303300145089280 0.205162145461308]; %[kg m^2] 7 | p_PSM_Jxz= [5.34444530475531e-07 0.0305476020850776]; %[kg m^2] 8 | p_PSM_Jy= [1.18156501496769e-05 0.0257572728925912]; %[kg m^2] 9 | 10 | if (strcmp(typ_EM,'PSM') == 1) 11 | Jy = p_PSM_Jy(1)*M_EM_nenn*n_EM_nenn^(2/3) + p_PSM_Jy(2); %[kg m^2] 12 | Jx = p_PSM_Jxz(1)*M_EM_nenn^(5/6)*n_EM_nenn^(7/6) + p_PSM_Jxz(2); 13 | Jz = Jx; 14 | else 15 | Jy = p_ASM_Jy(1)*M_EM_nenn^2 + p_ASM_Jy(2)*M_EM_nenn + p_ASM_Jy(3); 16 | Jx = p_ASM_Jxz(1)*M_EM_nenn^2 + p_ASM_Jxz(2)*M_EM_nenn + p_ASM_Jxz(3); 17 | Jz = Jx; 18 | end 19 | 20 | end 21 | 22 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Inertness/SP_EM.m: -------------------------------------------------------------------------------- 1 | function [ x_EM, y_EM, z_EM ] = SP_EM( l_EM,l_GTR,b_GTR,akt_az) 2 | %Focus estimation (amounts only, allocation VA/HA in par_MDT). 3 | if akt_az == 1 4 | x_EM = -0.4*l_GTR; 5 | y_EM = -(0.5*b_GTR + 0.5*l_EM); 6 | z_EM = 0; 7 | else %rn must be distinguished left/right: x,y,z = [xyz_left xyz_right], y_axis points to the right wheel, x to the back 8 | x_EM = [-0.4*l_GTR -0.4*l_GTR]; 9 | y_EM = [-0.5*l_EM +0.5*l_EM]; 10 | z_EM = [0 0]; 11 | end 12 | 13 | end 14 | 15 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Mass Calculation/Mass_EM.m: -------------------------------------------------------------------------------- 1 | function m_EM = Mass_EM(M_nenn, n_nenn, typ_EM) 2 | 3 | % Pesce 4 | P_nenn = M_nenn*n_nenn*(2*pi/60);%[W] 5 | compPSM = strcmp('PSM', typ_EM); 6 | if compPSM == 1 7 | m_PSM = 0.5*((13.847*log(P_nenn/1000)-13.003)+(10.979*log(M_nenn)-17.908)); 8 | m_EM = m_PSM; 9 | end 10 | compASM = strcmp('ASM', typ_EM); 11 | if compASM == 1 12 | m_ASM = 0.5*((16.152*log(P_nenn/1000)+3.4576)+(24.184*log(M_nenn)-49.245)); 13 | m_EM = m_ASM; 14 | end 15 | 16 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Mass Calculation/Mass_controlEM.m: -------------------------------------------------------------------------------- 1 | function m_EM = Masse_SteuerEM(M_nenn, n_nenn) 2 | 3 | P_nenn = M_nenn*n_nenn*(2*pi/60);%[W] 4 | LD = 1800; %[W/kg] Gravimetric nominal power density from Matz 5 | m_EM = P_nenn/LD; 6 | 7 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Mass Calculation/inertness_EM.m: -------------------------------------------------------------------------------- 1 | function [ J ] = inertness_EM( M_nenn, n_nenn, typ_EM, i ) 2 | %in the case close to the wheel, a vector [J in the first gear J in the second gear] is created. 3 | %regression 4 | J_PSM = 0.0002*M_nenn-0.0029; %[kg m^2] Pesce S.49 5 | 6 | m_PSM = Mass_EM(M_nenn,n_nenn,'PSM');%[kg] 7 | m_ASM = Mass_EM(M_nenn,n_nenn,'ASM'); 8 | 9 | J_ASM = (1+(m_ASM - m_PSM)/(2*m_PSM))*J_PSM;%[kg m^2] 10 | 11 | %Lower bounds, Pesce S.49 12 | if J_PSM < 0.001 13 | J_PSM = 0.001; 14 | end 15 | if J_ASM < 0.001 16 | J_ASM = 0.001; 17 | end 18 | 19 | tf = strcmp(typ_EM, 'PSM'); 20 | if tf == 1 21 | J = J_PSM*i.^2; 22 | else 23 | J = J_ASM*i.^2; 24 | end 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/Cost_Calculation_Motor.m: -------------------------------------------------------------------------------- 1 | function [Kosten_Motor, MK, K_Anbauteile, KO_FT]=Cost_Calculation_Motor(MV, A_wS, l_WK, typ_EM, D_a, l_fe, D, A_wL, P_n, Stkzahl, Magnetpreise, akt_az, Standort, V_Gehaeuse, A_nuten_Stator, A_nuten_Rotor, A_Luftspalt, A_Magnete, D_i, Maschinendaten) 2 | % In this script, the individual cost items are calculated on the basis of the 3 | % machine dimensioning is calculated. 4 | 5 | 6 | %% Material cost calculation 7 | 8 | [MK_gesamt, MK] = MaterialCostCalculation_EM(MV, A_wS, l_WK, typ_EM, D_a, l_fe, D, A_wL, P_n, Stkzahl, Magnetpreise, V_Gehaeuse, A_nuten_Stator, A_nuten_Rotor, A_Luftspalt, A_Magnete, D_i, Maschinendaten); %% Add-on cost calculation 9 | 10 | K_Anbauteile = addons_EM(Stkzahl, P_n, akt_az); 11 | 12 | %% Production cost calculation 13 | 14 | [K_Fertigung_EM, KO_FT] = Manufacturing_Cost(Stkzahl, Standort, typ_EM, P_n); 15 | 16 | %% Toatl cost calculation motor 17 | 18 | TotalCost_Motor 19 | 20 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/Length_EM.m: -------------------------------------------------------------------------------- 1 | function [ l ] = Length_EM( typ_EM, M_EM_nenn, n_EM_nenn, Optimierung) 2 | 3 | if Optimierung.linux_paths == 1 4 | load('./../mat-Files/Regressionen/Laengenkoeffizienten_EM.mat'); 5 | else 6 | load('./mat-Files/Regressionen/Laengenkoeffizienten_EM.mat'); 7 | end 8 | %disp(Optimierung) 9 | % load('./mat-Files/Regressionen/Laengenkoeffizienten_EM.mat'); 10 | if(strcmp('PSM',typ_EM)==1) 11 | l = p_PSM(1)*M_EM_nenn^(3/6)*n_EM_nenn^(11/6) + p_PSM(2);%[mm] 12 | else 13 | l = 216; 14 | end 15 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/Load_Factor.m: -------------------------------------------------------------------------------- 1 | function [C_m, eta, cos_phi]=Load_Factor(P_n, p, Maschinentyp) 2 | 3 | x5=[5 20 40 60 80 100 120 140 160 180 200]; 4 | y5=[82.1 87.8 89.8 90.8 91.5 92 92.33 92.6 92.8 92.933 93]; 5 | n5=length(x5); 6 | p5=polyfit(x5,y5,n5-1); 7 | x5n=5:0.1:200; 8 | f5=polyval(p5,x5n); 9 | 10 | % for p=1-3 11 | x6=[5 20 40 60 80 100 120 140 160 180 200]; 12 | y6=[0.830 0.862 0.871 0.875 0.88 0.882 0.8822 0.8824 0.8826 0.8828 0.883]; 13 | n6=length(x6); 14 | p6=polyfit(x6,y6,n6-2); 15 | x6n=5:0.1:200; 16 | f6=polyval(p6,x6n); 17 | % for p=4-8 18 | x7=[10 20 40 60 80 100 120 140 160 180 200]; 19 | y7=[0.742 0.760 0.770 0.775 0.780 0.783 0.785 0.786 0.788 0.789 0.790]; 20 | n7=length(x7); 21 | p7=polyfit(x7,y7,n7-2); 22 | x7n=10:0.1:200; 23 | f7=polyval(p7,x7n); 24 | 25 | 26 | if strcmp(Maschinentyp, 'PSM')==1 27 | % Estimate efficiency 28 | eta=polyval(p5,P_n)/100; 29 | 30 | % cos_phi 31 | cos_phi=0.85; 32 | 33 | % Calculate utilization factor 34 | P_s=eta*P_n/cos_phi; 35 | C_m=log10(P_s/(2*p))*1.4+2.2; %Maximalwert 36 | C_m=log10(P_s/(2*p))*1.0+2.0; %Mittelwert 37 | elseif strcmp(Maschinentyp, 'ASM')==1 38 | x=log10(P_n/(2*p)); 39 | 40 | % C_m=0.2*x^2+0.8*x+2.1; %Max. value f0r c_m 41 | C_m=0.2125*x^2+0.7225*x+1.7075; %mittelwert for c_m 42 | 43 | % cos_phi 44 | if p>=1 && p<=3 45 | cos_phi=polyval(p6,P_n); 46 | elseif p>=4 && p<=8 47 | cos_phi=polyval(p7,P_n); 48 | else 49 | disp('ungueltige Polpaarzahl zur Berechnung des Leistungsfaktors') 50 | end 51 | eta=polyval(p5,P_n)/100; 52 | 53 | end 54 | 55 | 56 | -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/MassCalc_EM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Motor/MassCalc_EM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/MaterialCostCalculation_EM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/9_Costmodel Angerer/Motor/MaterialCostCalculation_EM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/Rotor_Design.m: -------------------------------------------------------------------------------- 1 | function [d_welle_a, d_welle_i]=Rotor_Design(M_n, D_i) 2 | 3 | 4 | % d_welle_a=0.35*D_a; 5 | d_welle_a=D_i;% Shaft outer diameter corresponds to rotor inner diameter; in m 6 | 7 | %% Design of the rotor shaft 8 | 9 | % Material fatigue strength of the standard dimension 10 | r_tau=0.58; % [-] 11 | f_W=0.4; % [-] 12 | R_mn=900; % N/mm^2 13 | tau_WS_N=r_tau*f_W*R_mn; % N/mm^2 14 | 15 | % technological size factor 16 | a_dm=0.5; % [-] 17 | d_eff_N=11; % mm 18 | d_eff=10; % mm (corresponds to the wall thickness of the hollow shaft; is set here constantly to 10 mm to avoid iterations) 19 | K_dm=(1-0.7686*a_dm*log10(d_eff/7.5))/(1-0.7686*a_dm*log10(d_eff_N/7.5)); % [-] 20 | 21 | % Material fatigue strength 22 | tau_WS=tau_WS_N*K_dm; % in N/mm^2 23 | 24 | % Component fatigue strength 25 | tau_AK_t=tau_WS; % in N/mm^2 26 | 27 | % permissible torsional stress 28 | S_Dt=2; %Safety [-] 29 | tau_t=tau_AK_t/S_Dt; % in N/mm^2 30 | 31 | % Minimum required torsional moment of resistance 32 | T_max=2*M_n*1000; % in Nm 33 | W_t=(T_max/tau_t) * 1e-6; % in m^3 34 | 35 | % Inner diameter 36 | % if (((d_welle_a*1000)^4)-(16*d_welle_a*1000*W_t/pi))>0 37 | % d_welle_i=0.001*nthroot((((d_welle_a*1000)^4)-(16*d_welle_a*1000*W_t/pi)), 4); % in meter 38 | % else 39 | % d_welle_i=0; 40 | % disp(['Outer diameter of the shaft is only', num2str(d_welle_a*1000), ' mm']) 41 | % end 42 | % 43 | % if d_welle_a-0.020 47 | d_welle_i=0.001*nthroot((((d_welle_a)^4)-(16*d_welle_a*W_t/pi)), 4); % in m 48 | else 49 | d_welle_i=0; 50 | disp(['Outer diameter of the shaft is only', num2str(d_welle_a), ' m']) 51 | end 52 | 53 | if d_welle_a-0.02=20000 15 | Resolver=29; 16 | Stecker=3; 17 | NTC=0.8; 18 | Schrauben=1+0.0111*P_n_VA_ANB; 19 | Lager=8+0.133*P_n_VA_ANB; 20 | Uebriges=3+0.02*P_n_VA_ANB; 21 | 22 | K_Anbauteile=Resolver+Stecker+NTC+Schrauben+Lager+Uebriges; % in Euro per piece 23 | 24 | elseif Stkzahl<20000 && Stkzahl>=3000 25 | Resolver=32; 26 | Stecker=4; 27 | NTC=1; 28 | Schrauben=3; 29 | Lager=20+0.333*P_n_VA_ANB; 30 | Uebriges=5; 31 | 32 | K_Anbauteile=Resolver+Stecker+NTC+Schrauben+Lager+Uebriges; % in Euro per piece 33 | 34 | else Stkzahl<3000 35 | Resolver=40; 36 | Stecker=10; 37 | NTC=2; 38 | Schrauben=3; 39 | Lager=40+0.333*P_n_VA_ANB; 40 | Uebriges=7; 41 | 42 | K_Anbauteile=Resolver+Stecker+NTC+Schrauben+Lager+Uebriges; % in Euro per piece 43 | end 44 | %% 45 | clearvars Resolver Stecker NTC Schrauben Lager Uebriges P_n_VA_ANB -------------------------------------------------------------------------------- /MEAPA+Optimization/9_Costmodel Angerer/Motor/calc_Lambda.m: -------------------------------------------------------------------------------- 1 | function [lambda]= calc_Lambda(p); 2 | %% Determination of the relative armature length lambda HERZOG: Script for the lecture: "Entwurf elektrischer Maschinen". SS15. S. 208 3 | if p==1 4 | lambda= 1.4; % between 1 and 4 5 | elseif p>1 6 | lambda=nthroot(p,3); 7 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/Interface_LDS.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/Interface_LDS.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/.gitattributes: -------------------------------------------------------------------------------- 1 | *.mlx -crlf -diff -merge 2 | *.mat -crlf -diff -merge 3 | *.fig -crlf -diff -merge 4 | *.p -crlf -diff -merge 5 | *.slx -crlf -diff -merge 6 | *.mdl -crlf -diff -merge 7 | 8 | 9 | *.mdlp -crlf -diff -merge 10 | *.slxp -crlf -diff -merge 11 | *.sldd -crlf -diff -merge 12 | *.mexa64 -crlf -diff -merge 13 | *.mexw64 -crlf -diff -merge 14 | *.mexmaci64 -crlf -diff -merge 15 | *.xlsx -crlf -diff -merge 16 | *.docx -crlf -diff -merge 17 | *.pdf -crlf -diff -merge 18 | *.jpg -crlf -diff -merge 19 | *.png -crlf -diff -merge -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS_ALL.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS_ALL.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS_RUM.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/ARTEMIS_RUM.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Artemis/ARTEMIS.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Artemis/ARTEMIS.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Artemis/Urban.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Artemis/Urban.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Artemis/motorway.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Artemis/motorway.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Artemis/road.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Artemis/road.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY130.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY130.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY150.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_MOTORWAY150.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_ROAD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_ROAD.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_URBAN.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_ARTEMIS_URBAN.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_City.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_City.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_EUDC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_EUDC.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_NEDC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_NEDC.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_UDC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/EUROPE_UDC.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_15_MODE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_15_MODE.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_MODE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_MODE.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_MODE_3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_10_MODE_3.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_11_MODE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_11_MODE.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_11_MODE_4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_11_MODE_4.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_15_MODE.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/JAPAN_15_MODE.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/REAL_TAXI_1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/REAL_TAXI_1.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/REAL_TAXI_2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/REAL_TAXI_2.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/Berlin2018_tsv_roborace_FormelE_Strecke.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/Berlin2018_tsv_roborace_FormelE_Strecke.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/HK2019_vat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/HK2019_vat.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/Roborace_Berlin.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/Roborace_Berlin.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/berlin2019_vat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/berlin2019_vat.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/monteblanco2019_vat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/monteblanco2019_vat.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace/paris2019_vat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace/paris2019_vat.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Berlin.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Berlin.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace_HK.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace_HK.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Monteblanco.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Monteblanco.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Paris.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/Roborace_Paris.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_CITY_I.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_CITY_I.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_CITY_II.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_CITY_II.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_72.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_72.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_75.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_75.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_HIGHWAY.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_FTP_HIGHWAY.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/USA_NECC.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/USA_NECC.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/VEMTaxi/VEMTaxi.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/VEMTaxi/VEMTaxi.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/VEMTaxi/VEM_Taxi.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/VEMTaxi/VEM_Taxi.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/VEM_Taxi.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/VEM_Taxi.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/VEM_Taxi_ms.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/VEM_Taxi_ms.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Driving_Cycles/WLTP_class_3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Driving_Cycles/WLTP_class_3.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/Archiev/Dynamic_Plot_1_Motor.m: -------------------------------------------------------------------------------- 1 | function Dynamic_Plot_1_Motor(Kennfeld_Darstellung,x_contourf, y_contourf,Drehzahl,Moment, Zyklus) 2 | 3 | [TumColors] = tumColors( ); 4 | 5 | subplot(2,1,1) 6 | contourf(x_contourf, y_contourf,Kennfeld_Darstellung) 7 | title('Motor 1') 8 | 9 | hold on 10 | 11 | subplot(2,1,2); 12 | plot (Zyklus.speed) 13 | title('Zyklus') 14 | 15 | hold on 16 | 17 | subplot(2,1,1) 18 | s1=scatter(Drehzahl(1),Moment(1), 'filled'); 19 | 20 | subplot(2,1,2); 21 | s3=scatter(1, Zyklus.speed(1),'filled'); 22 | 23 | 24 | for i = 2:length(Drehzahl) 25 | 26 | s1.CData=TumColors.secondaryDarkGrey; 27 | s3.CData=TumColors.primaryBlue; 28 | 29 | s1=scatter(subplot(2,1,1),Drehzahl(i),Moment(i), 'filled'); 30 | 31 | 32 | s3=scatter(subplot(2,1,2),i, Zyklus.speed(i),'filled'); 33 | 34 | % pause 2/10 second: 35 | pause(0.05) 36 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/Archiev/Dynamic_Plot_2_Motors.m: -------------------------------------------------------------------------------- 1 | function Dynamic_Plot_2_Motors(Kennfeld_Darstellung_1,x_contourf_1, y_contourf_1,Drehzahl_1,Moment_1,Kennfeld_Darstellung_2,x_contourf_2, y_contourf_2,Drehzahl_2,Moment_2, Zyklus) 2 | 3 | [TumColors] = tumColors( ); 4 | 5 | subplot(2,2,1) 6 | contourf(x_contourf_1, y_contourf_1,Kennfeld_Darstellung_1) 7 | title('Motor 1') 8 | 9 | hold on 10 | 11 | subplot(2,2,2) 12 | contourf(x_contourf_2, y_contourf_2,Kennfeld_Darstellung_2) 13 | title('Motor 2') 14 | 15 | hold on 16 | 17 | subplot(2,2,3:4); 18 | plot (Zyklus.speed) 19 | title('Zyklus') 20 | 21 | hold on 22 | 23 | subplot(2,2,1) 24 | s1=scatter(Drehzahl_1(1),Moment_1(1), 'filled'); 25 | 26 | subplot(2,2,2) 27 | s2=scatter(Drehzahl_2(1),Moment_2(1), 'filled'); 28 | 29 | subplot(2,2,3:4); 30 | s3=scatter(1, Zyklus.speed(1),'filled'); 31 | 32 | 33 | for i = 2:length(Drehzahl_1) 34 | 35 | s1.CData=TumColors.secondaryDarkGrey; 36 | s2.CData=TumColors.secondaryDarkGrey; 37 | s3.CData=TumColors.primaryBlue; 38 | 39 | s1=scatter(subplot(2,2,1),Drehzahl_1(i),Moment_1(i), 'filled'); 40 | 41 | s2=scatter(subplot(2,2,2),Drehzahl_2(i),Moment_2(i), 'filled'); 42 | 43 | s3=scatter(subplot(2,2,3:4),i, Zyklus.speed(i),'filled'); 44 | 45 | % pause 2/10 second: 46 | pause(0.05) 47 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/Archiev/Erstellung_Kennfeld_Darstellung.m: -------------------------------------------------------------------------------- 1 | function [Kennfeld_Darstellung,x_contourf,y_contourf]= Erstellung_Kennfeld_Darstellung (Motor) 2 | 3 | Kennfeld_Darstellung_Antrieb=Motor.Kennfeld_Antrieb; 4 | %Kennfeld_Darstellung_Antrieb(Kennfeld_Darstellung_Antrieb==100)=NaN; 5 | Kennfeld_Darstellung_Antrieb=1./Kennfeld_Darstellung_Antrieb; 6 | 7 | Kennfeld_Darstellung_Reku=Motor.Kennfeld_Reku; 8 | %Kennfeld_Darstellung_Reku(Kennfeld_Darstellung_Reku==0)=NaN; 9 | 10 | 11 | %Kennfeld_Darstellung=[flipud(Kennfeld_Darstellung_Reku);zeros(1,length(Kennfeld_Darstellung_Reku(1,:)));Kennfeld_Darstellung_Antrieb] 12 | 13 | Kennfeld_Darstellung=[flipud(Kennfeld_Darstellung_Reku(2:end,:));Kennfeld_Darstellung_Antrieb]; % Annahme jedes Kennfeld hat M=0 14 | 15 | 16 | x_contourf=linspace(0,Motor.Drehzahlgrenze,length(Kennfeld_Darstellung(1,:))); 17 | y_contourf=linspace(Motor.M_Max_Reku,Motor.M_Max,length(Kennfeld_Darstellung(:,1))); 18 | 19 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/Archiev/Ploterstellen.m: -------------------------------------------------------------------------------- 1 | function [] dynamicplot_motor(vehicle, dc, Tn) 2 | 3 | %% Check amount of motors 4 | AmountMot=length(vehicle.MOTOR) 5 | 6 | %% Creation of maps 7 | for i=1:1:AmountMot 8 | MotMap{i}=CreationMapPlot(vehicle.MOTOR{1,i}.eff) 9 | end 10 | 11 | %% Load Colors 12 | [TumColors] = tumColors( ); 13 | 14 | 15 | %% Framework Motors 16 | 17 | for i=1:1:AmountMot 18 | subplot(round(AmountMot/2)+1,2,i) 19 | contourf(vehicle.MOTOR{1,i}.eff_n_axis, vehicle.MOTOR{1,i}.eff_T_axis,MotMap{i}) 20 | 21 | title(strcat('Motor',int2str(i))) 22 | 23 | hold on 24 | 25 | end 26 | 27 | %% Framework Cycle 28 | subplot(round(AmountMot/2)+1,2,i+1:i+2); 29 | plot (dc.speed) 30 | title('Driving Cycle') 31 | 32 | 33 | %% First Scatter 34 | for i=1:1:AmountMot+1 35 | subplot(round(AmountMot/2)+1,2,i) 36 | s{i}=scatter(Tn(2,i),Tn(1,i), 'filled'); 37 | end 38 | 39 | %% Other Scatter 40 | 41 | for i = 2:length(Tn(1,:)) 42 | 43 | for j=1:AmountMot-1 44 | s1.CData=TumColors.secondaryDarkGrey; 45 | s2.CData=TumColors.secondaryDarkGrey; 46 | s3.CData=TumColors.primaryBlue; 47 | 48 | s1=scatter(subplot(2,2,1),Drehzahl_1(i),Moment_1(i), 'filled'); 49 | 50 | s2=scatter(subplot(2,2,2),Drehzahl_2(i),Moment_2(i), 'filled'); 51 | 52 | s3=scatter(subplot(2,2,3:4),i, Zyklus.speed(i),'filled'); 53 | 54 | % pause 2/10 second: 55 | pause(0.05) 56 | end 57 | 58 | 59 | 60 | 61 | 62 | end 63 | 64 | 65 | 66 | [Kennfeld_Darstellung_Vorne,x_contourf_Vorne,y_contourf_Vorne]= Erstellung_Kennfeld_Darstellung (Motor_Vorne); 67 | [Kennfeld_Darstellung_Hinten,x_contourf_Hinten,y_contourf_Hinten]= Erstellung_Kennfeld_Darstellung (Motor_Hinten); 68 | 69 | Dynamic_Plot_2_Motors(Kennfeld_Darstellung_Vorne,x_contourf_Vorne,y_contourf_Vorne,DATA(2,:),DATA(1,:),Kennfeld_Darstellung_Hinten,x_contourf_Hinten,y_contourf_Hinten,DATA(5,:),DATA(4,:),dc) 70 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/Archiev/Ploterstellen_1Motor.m: -------------------------------------------------------------------------------- 1 | 2 | [Kennfeld_Darstellung_Hinten,x_contourf_Hinten,y_contourf_Hinten]= Erstellung_Kennfeld_Darstellung (Motor_Hinten) 3 | 4 | Dynamic_Plot_1_Motor(Kennfeld_Darstellung_Hinten,x_contourf_Hinten,y_contourf_Hinten,DATA(2,:),DATA(1,:),dc) 5 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/CreationMapPlot.m: -------------------------------------------------------------------------------- 1 | function [MotMap]=CreationMapPlot(map) 2 | 3 | 4 | B=map>1 ; 5 | MotMap = 1./map.*B + ~B.*map; 6 | 7 | 8 | 9 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/GUI_LDS/GUI_LDS.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Graphical_Evaluation/GUI_LDS/GUI_LDS.fig -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/GUI_LDS/GUI_LDS.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Graphical_Evaluation/GUI_LDS/GUI_LDS.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/dynamicplot_motor.m: -------------------------------------------------------------------------------- 1 | function [Tn] =dynamicplot_motor(vehicle, dc, Tn) 2 | 3 | %% Rearange vehicle.MOTOR 4 | vehicle.MOTOR=vehicle.MOTOR(~cellfun('isempty',vehicle.MOTOR)) ; 5 | 6 | figure 7 | %% Check amount of motors 8 | AmountMot=length(vehicle.MOTOR); 9 | 10 | %% Creation of maps 11 | for i=1:1:AmountMot 12 | MotMap{i}=CreationMapPlot(vehicle.MOTOR{1,i}.eff); 13 | end 14 | 15 | %% Load Colors 16 | [TumColors] = tumColors( ); 17 | 18 | 19 | %% Framework Motors 20 | Plot_Label_Vektor_eta = [0.7,0.75,0.8,0.84,0.86,0.88,0.9,0.91,0.92,0.93,0.94,0.95,0.96,0.97,0.98,0.99,0.995]; 21 | for i=1:1:AmountMot 22 | subplot(round(AmountMot/2)+1,2,i) 23 | contourf(vehicle.MOTOR{1,i}.eff_n_axis, vehicle.MOTOR{1,i}.eff_T_axis,MotMap{i}, Plot_Label_Vektor_eta) %Beim Weglassen dieser Zeile, bleibt das Kennfeld im Hintergrund weg 24 | 25 | title(strcat('Motor',int2str(i))) 26 | xlabel('Rev. Speed in 1/min') 27 | ylabel('Torque in Nm') 28 | 29 | hold on 30 | 31 | end 32 | 33 | %% Framework Cycle 34 | subplot(round(AmountMot/2)+1,2,(2*round(AmountMot/2)+1):(2*round(AmountMot/2)+2)); 35 | plot (dc.speed) 36 | title('Driving Cycle') 37 | xlabel('Time in s') 38 | ylabel('Speed in m/s') 39 | 40 | hold on 41 | 42 | 43 | %% First Scatter 44 | for i=1:1:AmountMot 45 | subplot(round(AmountMot/2)+1,2,i) 46 | s{i}=scatter(Tn(2,i),Tn(1,i), 'filled'); 47 | end 48 | subplot(round(AmountMot/2)+1,2,(2*round(AmountMot/2)+1):(2*round(AmountMot/2)+2)); 49 | s{AmountMot+1}=scatter(1, dc.speed(1),'filled'); 50 | 51 | %% Other Scatter 52 | 53 | for i = 2:length(Tn(1,:)) 54 | 55 | for j=1:AmountMot 56 | s{j}.CData=TumColors.secondaryDarkGrey; 57 | end 58 | s{AmountMot+1}.CData=TumColors.primaryBlue; 59 | 60 | 61 | for j=1:AmountMot 62 | s{j}=scatter(subplot(round(AmountMot/2)+1,2,j),Tn(j*2,i)*60,Tn(j*2-1,i), 'filled'); %Tn stellt Matrix der Betriebspunkte dar, durch *60 ist es danach in Minuten. Vorher ist es in Sekunden, jetzt Umdrehungen/Minute. 63 | end 64 | % pause 2/10 second: 65 | 66 | s{AmountMot+1}=scatter(subplot(round(AmountMot/2)+1,2,(2*round(AmountMot/2)+1):(2*round(AmountMot/2)+2)),i, dc.speed(i),'filled'); 67 | 68 | %pause(0.0000001) %war vorher auf 0.05 %hier kann plotpause ausgestellt werden 69 | end 70 | 71 | 72 | end 73 | 74 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Graphical_Evaluation/tumColors.m: -------------------------------------------------------------------------------- 1 | function [ TumColors ] = tumColors( ) 2 | %tumColors creates struct with TUM corporate identiy colors for use in 3 | %plots etc. 4 | % S. Wolff 29.06.2018 5 | 6 | TumColors.primaryBlue = [0 101 189] ./255; 7 | TumColors.primaryBlack = [0 0 0] ./255; 8 | TumColors.primaryWhite = [255 255 255] ./255; 9 | 10 | TumColors.secondaryLightBlue = [0 82 147] ./255; 11 | TumColors.secondaryDarkBlue = [0 51 89] ./255; 12 | TumColors.secondaryLightGrey = [217 218 219] ./255; 13 | TumColors.secondaryGrey = [156 157 159] ./255; 14 | TumColors.secondaryDarkGrey = [88 88 90] ./255; 15 | 16 | TumColors.accentBeige = [218 215 203] ./255; 17 | TumColors.accentOrange = [227 114 34] ./255; 18 | TumColors.accentGreen = [162 173 0] ./255; 19 | TumColors.accentLightBlue = [152 198 234] ./255; 20 | TumColors.accentDarkBlue = [100 160 200] ./255; 21 | 22 | TumColors.extended1 = [105 8 90] ./255; 23 | TumColors.extended2 = [15 27 9] ./255; 24 | TumColors.extended3 = [50 119 138] ./255; 25 | TumColors.extended4 = [0 124 48] ./255; 26 | TumColors.extended5 = [103 154 29] ./255; 27 | TumColors.extended6 = [255 220 0] ./255; 28 | TumColors.extended7 = [249 186 0] ./255; 29 | TumColors.extended8 = [214 76 19] ./255; 30 | TumColors.extended9 = [196 7 27] ./255; 31 | TumColors.extended10 = [156 13 22] ./255; 32 | 33 | end 34 | 35 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/RUN_simulation.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Simulation/RUN_simulation.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/BatteryEfficiency.m: -------------------------------------------------------------------------------- 1 | function [P_EL_MIN] = BatteryEfficiency(P_EL_MIN) 2 | if P_EL_MIN>=0 3 | P_EL_MIN=P_EL_MIN/0.97 4 | else 5 | P_EL_MIN=P_EL_MIN*0.97 6 | end 7 | end 8 | 9 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Calc_Resistance.m: -------------------------------------------------------------------------------- 1 | 2 | function [v, V, F_Ges]=Calc_Resistance(v,a,alpha, vehicle) 3 | 4 | 5 | %% Calculation of Resistance 6 | 7 | F_Air=0.5*vehicle.environment.roh_L*vehicle.c_w*vehicle.A_front*v.^2; 8 | F_Roll=vehicle.m*vehicle.environment.g*vehicle.f_R*cos(alpha); 9 | F_Slope=vehicle.m*vehicle.environment.g*sin(alpha); 10 | F_Acc=(vehicle.m+vehicle.rotatingMass)*a; 11 | 12 | F_Ges= F_Air + F_Roll + F_Slope + F_Acc; 13 | 14 | 15 | %% Calculation of required Torque and revs 16 | Torque_Total=F_Ges*vehicle.r_tyre; 17 | 18 | n= v/vehicle.r_tyre/2/pi; % 1/s 19 | 20 | V=[Torque_Total;n]; 21 | 22 | % Antriebsleistung P = F_Ges *v 23 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Calc_Resistance_with_recu.m: -------------------------------------------------------------------------------- 1 | 2 | function [V]=Calc_Resistance(v,a,alpha, vehicle) 3 | 4 | 5 | %% Calculation of Resistance 6 | 7 | F_Air=0.5*vehicle.environment.roh_L*vehicle.c_w*vehicle.A_front*v.^2; 8 | F_Roll=vehicle.m*vehicle.environment.g*vehicle.f_R*cos(alpha); 9 | F_Slope=vehicle.m*vehicle.environment.g*sin(alpha); 10 | F_Acc=(vehicle.m+vehicle.rotatingMass)*a; 11 | 12 | F_Ges= F_Air + F_Roll + F_Slope + F_Acc; 13 | 14 | 15 | %% Calculation of required Torque and revs 16 | Torque_Total=F_Ges*vehicle.r_tyre; 17 | 18 | n= v/vehicle.r_tyre/2/pi; % 1/s 19 | 20 | 21 | 22 | V=[Torque_Total;n]; 23 | 24 | 25 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Determination_Distribution.m: -------------------------------------------------------------------------------- 1 | function [P_EL_MIN, DATA] = Determination_Distribution (P_EL_1,P_EL_2, DATA_IN) 2 | 3 | NumofLines=length(P_EL_1(:,1)); 4 | 5 | P_EL_ALL=P_EL_1(1,:)+P_EL_2(1,:); 6 | 7 | n=100; 8 | 9 | P_EL_ALL_R=reshape(P_EL_ALL,n,[]); 10 | 11 | [~, idx]=min(P_EL_ALL_R,[ ],1); 12 | 13 | V_idx=([0:1:P_EL_1(end,end)-1]*n)+idx; 14 | 15 | if NumofLines>2 16 | P_EL_ALL(2:NumofLines-1,:)=P_EL_1(2:NumofLines-1,:); 17 | end 18 | 19 | P_EL_MIN=P_EL_ALL(:,V_idx); 20 | 21 | DATA=DATA_IN(:,V_idx); 22 | 23 | 24 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Determination_Gear.m: -------------------------------------------------------------------------------- 1 | function [P_EL_Gear, DATA] = Determination_Gear (P_EL, Gearbox, DATA_IN) 2 | 3 | NumberofGears= length(Gearbox.gear_ratio); 4 | 5 | NumofLines=length(P_EL(:,1)); 6 | 7 | P_EL_R=reshape(P_EL(1,:),NumberofGears,[]); 8 | 9 | [~, idx]=min(P_EL_R,[ ],1); 10 | 11 | V_idx=[0:NumberofGears:(length(P_EL(1,:))-NumberofGears)]+idx; 12 | 13 | P_EL_Gear=P_EL(1:NumofLines-1,V_idx); 14 | 15 | DATA=[DATA_IN(:,V_idx);P_EL(NumofLines,V_idx)]; 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | % 48 | % NumberofGears= length(Gearbox.gear_ratio); 49 | % 50 | % NumbofLines=length(P_EL(:,1)); 51 | % %P_EL_Gear=[]; 52 | % 53 | % P_EL_Gear=zeros(NumbofLines-1,length(P_EL(1,:))/NumberofGears); 54 | % 55 | % j=1; 56 | % 57 | % % GearPossibilities=[]; 58 | % 59 | % for i=1:NumberofGears:length(P_EL(1,:)) 60 | % GearPossibilities=[]; 61 | % for x=i:1:(i+NumberofGears-1) 62 | % GearPossibilities=[GearPossibilities P_EL(1,x)]; 63 | % end 64 | % 65 | % [P_EL_G(1,j), Gear]=min(GearPossibilities); 66 | % 67 | % 68 | % 69 | % DATA(:,j)=[DATA_IN(:,i+Gear-1);Gear]; 70 | % % if i==1 71 | % 72 | % if NumbofLines-1 >=2 73 | % P_EL_Gear(:,j) = [P_EL_G(:,j);P_EL(2:NumbofLines-1,x)]; 74 | % else 75 | % P_EL_Gear(:,j) = [P_EL_G(:,j)]; 76 | % end 77 | % 78 | 79 | % else 80 | 81 | % if NumbofLines-1 >=2 82 | % P_EL_Griebe = [P_EL_Griebe [P_EL_G(:,j);P_EL(2:NumbofLines-1,x)]]; 83 | % else 84 | % P_EL_Griebe = [P_EL_Griebe [P_EL_G(:,j)]]; 85 | % end 86 | 87 | % end 88 | 89 | 90 | 91 | 92 | % 93 | % j=j+1; 94 | % 95 | % end 96 | 97 | %for i=1:NumberofGears:length(P_EL(1,:)) 98 | % [P_EL(j) idx_Gang(j)]=min([P_EL(i) P_EL(i+1) P_EL(i+2)]); 99 | % 100 | % j=j+1; 101 | end 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Determination_Power.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Determination_Power.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Partition_Gearbox.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Partition_Gearbox.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Partition_Torque.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Basic_Functions/Partition_Torque.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Simulation_GM_GM.m: -------------------------------------------------------------------------------- 1 | %% Simulation vehicle 2 | 3 | 4 | function [P_EL_MIN, DATA_R]=Simulation_GM_GM(V, v, a, vehicle) 5 | 6 | %SIMULATION_GM_GM calculates the required energy consumption of a vehicle 7 | %with the powertrain GM_GM (Gearbox and Motor at each axle) 8 | 9 | % Author: Alexander Koch, FTM, TUM 10 | % Date: 12/10/2018 11 | 12 | %% Inputs 13 | % V: Matrix with required Torque of vehicle in first line and revolutional speed of wheels in second line 14 | % vehicle: struct with the vehicle parameters 15 | 16 | 17 | %% Outputs 18 | % P_EL_MIN: Vektor with minimal electrical power requirement for every time step 19 | % DATA_R: Struct with Data about the motor torque, revolutional speed and Gear 20 | 21 | vehicle.troque_range{1} = [vehicle.MOTOR{1}.eff_T_axis(end)*max(vehicle.GEARBOX{1}.gear_ratio);vehicle.MOTOR{1}.eff_T_axis(1)*min(vehicle.GEARBOX{1}.gear_ratio)]; 22 | vehicle.troque_range{2} = [vehicle.MOTOR{1}.eff_T_axis(end)*max(vehicle.GEARBOX{1}.gear_ratio);vehicle.MOTOR{1}.eff_T_axis(1)*min(vehicle.GEARBOX{1}.gear_ratio)]; 23 | 24 | 25 | %% Powertrain 26 | 27 | [V_Axle_Front, V_Axle_Rear]= Partition_Torque(vehicle.troque_range{1}, vehicle.troque_range{2}, V); 28 | 29 | [V_Gearbox_Front]= Partition_Gearbox(vehicle.GEARBOX{1,1}, V_Axle_Front); 30 | 31 | [V_Gearbox_Rear]= Partition_Gearbox(vehicle.GEARBOX{1,1},V_Axle_Rear); 32 | 33 | [P_EL_Motor_Front, DATA_Front] = Determination_Power (V_Gearbox_Front, vehicle.MOTOR{1,1}); 34 | 35 | [P_EL_Motor_Rear, DATA_Rear] = Determination_Power (V_Gearbox_Rear, vehicle.MOTOR{1,1}); 36 | 37 | [P_EL_Getriebe_Front, DATA_Front] = Determination_Gear (P_EL_Motor_Front, vehicle.GEARBOX{1,1}, DATA_Front); 38 | 39 | [P_EL_Getriebe_Rear, DATA_Rear] = Determination_Gear (P_EL_Motor_Rear, vehicle.GEARBOX{1,1}, DATA_Rear); 40 | 41 | [P_EL_MIN, DATA] = Determination_Distribution (P_EL_Getriebe_Front,P_EL_Getriebe_Rear, [DATA_Front;DATA_Rear]); 42 | 43 | P_EL_MIN=P_EL_MIN+vehicle.auxiliary; 44 | 45 | 46 | %% Battery (Simple Eff) 47 | [P_EL_MIN]=BatteryEfficiency(P_EL_MIN); 48 | 49 | %% Rearangement of DATA 50 | 51 | % if v and a == 0 No Torque is required 52 | DATA(1,(v==0&a==0))=0; 53 | DATA(4,(v==0&a==0))=0; 54 | 55 | 56 | DATA_R.Tn=zeros(4,length(DATA(1,:))); 57 | 58 | 59 | DATA_R.Tn(1,:)=DATA(1,:); 60 | DATA_R.Tn(2,:)=DATA(2,:); 61 | DATA_R.Tn(3,:)=DATA(4,:); 62 | DATA_R.Tn(4,:)=DATA(5,:); 63 | DATA_R.Gear_1=DATA(3,:); 64 | DATA_R.Gear_2=DATA(6,:); 65 | 66 | 67 | end 68 | 69 | 70 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Simulation_GM_X.m: -------------------------------------------------------------------------------- 1 | %% Simulation vehicle 2 | 3 | function [P_EL_MIN, DATA_R]=Simulation_GM_X(V, v, a, vehicle) 4 | 5 | %SIMULATION_GM_X calculates the required energy consumption of a vehicle 6 | %with the powertrain GM_X (Gearbox and Motor at one axle, other axle 7 | %powerless) 8 | 9 | % Author: Alexander Koch, FTM, TUM 10 | % Date: 12/10/2018 11 | 12 | %% Inputs 13 | % V: Matrix with required Torque of vehicle in first line and revolutional speed of wheels in second line 14 | % vehicle: struct with the vehicle parameters 15 | 16 | 17 | %% Outputs 18 | % P_EL_MIN: Vektor with minimal electrical power requirement for every time step 19 | % DATA_R: Struct with Data about the motor torque, revolutional speed and Gear 20 | 21 | 22 | 23 | %% Powertrain 24 | 25 | [V_Gearbox_Front]= Partition_Gearbox(vehicle.GEARBOX{1,1}, V); 26 | 27 | [P_EL_Motor_Front, DATA_Front] = Determination_Power (V_Gearbox_Front, vehicle.MOTOR{1,1}, vehicle); 28 | 29 | [P_EL_Gearbox_Front, DATA] = Determination_Gear (P_EL_Motor_Front, vehicle.GEARBOX{1,1}, DATA_Front); 30 | 31 | P_EL_MIN=P_EL_Gearbox_Front+vehicle.auxiliary; % P_EL_Gearbox stellt Maschinenleistung dar 32 | 33 | 34 | %% Battery (Simple Eff) 35 | 36 | %[P_EL_MIN]=BatteryEfficiency(P_EL_MIN); 37 | if P_EL_MIN>=0 38 | P_EL_MIN=P_EL_MIN/0.97; 39 | else 40 | P_EL_MIN=P_EL_MIN*0.97; 41 | end 42 | 43 | 44 | %% Rearangement of DATA 45 | 46 | % if v and a == 0 No Torque is required 47 | DATA(1,(v==0&a==0))=0; 48 | 49 | DATA_R.Tn=zeros(2,length(DATA(1,:))); 50 | 51 | DATA_R.Tn(1,:)=DATA(1,:); 52 | DATA_R.Tn(2,:)=DATA(2,:); 53 | DATA_R.Gear_1=DATA(3,:); 54 | 55 | end 56 | 57 | 58 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Simulation_energy_consumption.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Simulation/Simulation_Energy_Cons/Simulation_energy_consumption.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Simulation/meanEfficiency.m: -------------------------------------------------------------------------------- 1 | function [meanEffMix, effLoadPointsMix] = meanEfficiency(vehicle, Tn) 2 | %this function calculates the mean efficiency of all load points 3 | 4 | for i = 1:length(vehicle.MOTOR) 5 | if ~isempty(vehicle.MOTOR{i}) 6 | %intObj = griddedInterpolant({fliplr(vehicle.MOTOR{i}.eff_T_axis),vehicle.MOTOR{i}.eff_n_axis},vehicle.MOTOR{i}.eff); %create interpolation object 7 | intObj = griddedInterpolant({vehicle.MOTOR{i}.eff_T_axis,vehicle.MOTOR{i}.eff_n_axis},vehicle.MOTOR{i}.eff); %create interpolation object 8 | 9 | effMap = (vehicle.MOTOR{i}.eff); %write the eff map from each motor in this new value 10 | 11 | effLoadPoints(i,:) = intObj(Tn(i*2-1,:),Tn(i*2,:)*60); %interpolate eff. for all load points using the interp. object 12 | 13 | effRecu(i,:) = effLoadPoints.*(effLoadPoints>=1); %Recuperation efficiencies (eff. between 0 and 1) 14 | effRecu(i,:) = 1./effRecu(i,:); 15 | effRecu(i,effRecu==inf) = 0; 16 | 17 | effAccc(i,:) = effLoadPoints.*(effLoadPoints<1); %Acceleration efficiency 18 | 19 | effLoadPointsMix(i,:) = effRecu(i,:)+effAccc(i,:); %this is the mixed efficiency when both recu and acc are between 0 and 1; 20 | 21 | meanEff(i) = mean(effLoadPoints); %mean efficiency of all load points 22 | 23 | meanEffMix(i) = mean(effLoadPointsMix); %mean efficiency of all load points with mixed efficiency 24 | end 25 | end 26 | 27 | end -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Mass_calculation.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Mass_calculation.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Motor_efficiency/Regrid_map.m: -------------------------------------------------------------------------------- 1 | function [X, Y, MAP] = Regrid_map(x,y,map,nx,ny,xPol) 2 | %SCALE_EFF_MAP scales 2D characteristic maps and the axis vector to a 3 | %desired grid size. Designed to scale electric motor efficiency maps, but 4 | %can be used for any 2D map. 5 | 6 | %Author: Sebastian Krapf 7 | %05/12/2017 8 | 9 | %% Explanation 10 | % INPUT: 11 | % x: vector of axis of abscissa; SIZE: AAx1 12 | % y: vector of axis of ordinates; SIZE: 1xBB 13 | % map: matrix that contains data; SIZE: AAxBB 14 | % nx: number of desired data points abscissa 15 | % ny: number of desired data points ordinate 16 | % OUTPUT: 17 | % X: scaled vector of axis of abscissa 18 | % Y: scaled vector of axis of ordinates 19 | % MAP: scaled matrix that contains data 20 | 21 | %% Surpress warning 22 | warning('off','MATLAB:griddedInterpolant:MeshgridEval2DWarnId'); %Turn off interpolation warning 23 | 24 | %% Data treatment 25 | % create unisized vectors from x,y and map 26 | [xData,yData] = ndgrid(x, y); 27 | 28 | % create meshgrid with desired resolution (needed f. (extra-)interpolation) 29 | X = min(x) : (max(x)-min(x))/(nx-1) : max(x); %grid size depends on the input vector. if x(1) ~= 0, grid size from n x is 30 | Y = min(y) : (max(y)-min(y))/(ny-1) : max(y); 31 | [xq, yq] = meshgrid(X, Y); 32 | 33 | % map (extra-)interpolation 34 | F = griddedInterpolant(xData,yData,map','linear',xPol); %change of extrapolation method can lead to different results! 35 | MAP = F( xq, yq); 36 | X = X'; 37 | 38 | %% Plot - comment out, if not wished 39 | % figure; mesh(x,y,map); 40 | % title('Raw data'); colorbar; 41 | % figure; mesh(X,Y,MAP); 42 | % title('Interpolated data'); colorbar; 43 | 44 | %% Turn on warning again 45 | warning('on','MATLAB:griddedInterpolant:MeshgridEval2DWarnId'); 46 | end 47 | 48 | -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_2G2M_GM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_2G2M_GM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_GM_GM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_GM_GM.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_GM_X.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Para_Powertrain/Para_powertrain_GM_X.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Para_vehicle.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Para_vehicle.m -------------------------------------------------------------------------------- /MEAPA+Optimization/LDS/Vehicle/Saved_Vehicles/vehicle_eGolf.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/LDS/Vehicle/Saved_Vehicles/vehicle_eGolf.mat -------------------------------------------------------------------------------- /MEAPA+Optimization/MEAPA_Script.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA+Optimization/MEAPA_Script.m -------------------------------------------------------------------------------- /MEAPA+Optimization/Main.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Modell for the design and analysis of PMSM or ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (svenja.kalt@tum.de), 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | %% Bibliography 11 | % [Binder12] - Andreas Binder, Electrical Machines and Drives - Fundamentals, Operational Behavior, 978-3-540-71849-9. 12 | % [Meyer09] - Wolfgang Meyer, Automated design of electromechanical converters, 978-3-897-91406-3 13 | % [Meyer18] - Wolfgang Meyer, Design of electrical machines, Lecture notes 14 | % [Mueller08] - Germar Mueller, Calculation of electrical machines, 3-527-40525-9 15 | % [Mueller14] - Germar Mueller, Fundamentals of Electrical Machines, 3-527-41205-1 16 | % [Pyr14] - Juha Pyrhoenen, Design of rotating electrical machines, 978-1-118-58157-5 17 | 18 | %% List of abbreviations 19 | % V/A = simplification / assumption 20 | % Index 1: Stator 21 | % Index 2: Rotor 22 | 23 | %% Initialisation Script 24 | clear all, close all force, home 25 | 26 | % Restore paths 27 | restoredefaultpath; 28 | path(pathdef) 29 | addpath(genpath(pwd)); 30 | 31 | % Selection with or without GUI 32 | Enable_GUI = 1; 33 | 34 | 35 | %% Start 36 | if(Enable_GUI) 37 | 38 | GUI_Design; 39 | else 40 | %Maschine Design 41 | % Maschine topology - ASM oder PMSM 42 | rated.type = 'PMSM'; 43 | % Rated power P_N [W] 44 | rated.P_N = 75000; 45 | % Rated rotational speed n_N [U/min] 46 | rated.n_N = 4800; 47 | % Rated voltage U_N [V] 48 | rated.U_N = 360; 49 | % Max. rotational speed n_max [U/min] 50 | rated.nmax = 12000; 51 | % Number of pole pairs p [-] 52 | rated.p = 6; 53 | % Rated frequency f_N [-] 54 | rated.f_N = (rated.p * rated.n_N) / 60; 55 | % Number of strands m [-] 56 | rated.m = 3; 57 | % load factor [-] 58 | rated.cos_phi_N = 0.95; 59 | 60 | % Set to default BMW i3 vehicle 61 | rated.LDS.fz_m.String = num2str(1640); 62 | rated.LDS.cW.String = num2str(0.3); 63 | rated.LDS.A.String = num2str(2.38); 64 | rated.LDS.tyre_r.String = num2str(0.3498); 65 | rated.LDS.battcap.String = num2str(22); 66 | rated.LDS.aux.String = num2str(1500); 67 | rated.LDS.GearRatio.String = num2str(9.7); 68 | 69 | rated.LDS.visual_LDS = 0; %visual of LDS desired: 1, visual not desired: 0 70 | 71 | [Entwurf, Analyse] = MEAPA_Script(rated); 72 | end 73 | 74 | clear RESTOREDEFAULTPATH_EXECUTED Enable_GUI rated 75 | 76 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/Beschraenkungen_ASM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Hinweis: 11 | 12 | % Nennleistung je Polpaar in W 13 | % pos.P_N = [max min (p==8); max min (p==6); ... ; max min (p==1)] 14 | limit.P_N = [1600e3 64e3; 5000e3 1.0e3; 5000e3 1.0e3; 5000e3 1.0e3; 5000e3 1.0e3; 4000e3 1.0e3; 2000e3 1.2e3]; 15 | 16 | % Nenndrehzahl in 1/min 17 | limit.n_N = [Inf 0]; 18 | 19 | % Nennspannung in V 20 | limit.U_N = [Inf 0]; 21 | 22 | % Polpaarzahl 23 | limit.p = [8 6 5 4 3 2 1]; 24 | 25 | % Nennfrequenz in Hz 26 | limit.f_N = [Inf 0]; 27 | 28 | % Stangzahl 29 | limit.m = [3 3]; 30 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/Beschraenkungen_PMSM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Hinweis: 11 | 12 | % Nennleistung in kW 13 | limit.P_N = [2000e3 0]; 14 | 15 | % Nenndrehzahl in 1/min 16 | limit.n_N = [Inf 0]; 17 | 18 | % Nennspannung in V 19 | limit.U_N = [Inf 0]; 20 | 21 | % Polpaarzahl 22 | limit.p = [Inf 0]; 23 | 24 | % Nennfrequenz in Hz 25 | limit.f_N = [Inf 0]; 26 | 27 | % Leistungsfaktor 28 | limit.cos_phi_N = [1.0 0.7]; 29 | 30 | % Stangzahl 31 | limit.m = [3 3]; 32 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/Optionen_ASM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Elektroblech Materialien laden 11 | list = dir('5_Materialien/1_Elektroblech'); 12 | if isempty(list) 13 | Elektroblech_List = [{'-'}]; 14 | else 15 | Elektroblech_List = {}; 16 | for i = 1:length(list) 17 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 18 | Elektroblech_List = [Elektroblech_List, {list(i).name(1:end-4)}]; 19 | end 20 | end 21 | if isempty(Elektroblech_List) 22 | Elektroblech_List = [{'-'}]; 23 | end 24 | end 25 | 26 | % Leiter Materialien laden 27 | list = dir('5_Materialien/2_Leiter'); 28 | if isempty(list) 29 | Leiter_List = [{'-'}]; 30 | else 31 | Leiter_List = {}; 32 | for i = 1:length(list) 33 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 34 | Leiter_List = [Leiter_List, {list(i).name(1:end-4)}]; 35 | end 36 | end 37 | if isempty(Leiter_List) 38 | Leiter_List = [{'-'}]; 39 | end 40 | end 41 | 42 | % Maschinenausfuehrung 43 | opt.Maschinenausfuehrung = [{'Kaefiglaeufer'}];% {'Schleifringlaeufer'}]; 44 | 45 | % Schaltung 46 | opt.Schaltung = [{'Stern'};{'Dreieck'}]; 47 | 48 | % Spulenform Stator 49 | opt.Spulenform_Stator = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 50 | 51 | % Spulenform Rotor 52 | opt.Spulenform_Rotor = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 53 | 54 | % Nutform Stator 55 | opt.Nutform_Stator = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 56 | 57 | % Nutform Rotor 58 | opt.Nutform_Rotor = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 59 | 60 | % Kuehlung Stator 61 | opt.Kuehlungsart = [{'Oberflaechenkuehlung'}; {'Innen- oder Kreislaufkuehlung'}]; 62 | 63 | % Eisenmaterial Stator 64 | opt.Stator_Eisenmaterial.String = Elektroblech_List; 65 | 66 | % Leitermaterial Stator 67 | opt.Stator_Leitermaterial.String = Leiter_List; 68 | 69 | % Eisenmaterial Rotor 70 | opt.Rotor_Eisenmaterial.String = Elektroblech_List; 71 | 72 | % Leitermaterial Rotor 73 | opt.Rotor_Leitermaterial.String = Leiter_List; 74 | 75 | % Magnetmaterial Rotor 76 | opt.Rotor_Magnetmaterial.String = [{'-'}]; 77 | 78 | % Modus Wicklungsauslegung 79 | opt.Mode_Wicklung = [{'Klassisch'}; {'Optimierung'}; {'Manuell'}]; 80 | 81 | % Optimierungsziel Wicklung 82 | opt.Wicklungstyp = [{'A'}; {'B'}; {'C'}]; 83 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/1_Entwurf/1_Misc/Optionen_PMSM.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Elektroblech Materialien laden 11 | list = dir('5_Materialien/1_Elektroblech'); 12 | if isempty(list) 13 | Elektroblech_List = [{'-'}]; 14 | else 15 | Elektroblech_List = {}; 16 | for i = 1:length(list) 17 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 18 | Elektroblech_List = [Elektroblech_List, {list(i).name(1:end-4)}]; 19 | end 20 | end 21 | if isempty(Elektroblech_List) 22 | Elektroblech_List = [{'-'}]; 23 | end 24 | end 25 | 26 | % Leiter Materialien laden 27 | list = dir('5_Materialien/2_Leiter'); 28 | if isempty(list) 29 | Leiter_List = [{'-'}]; 30 | else 31 | Leiter_List = {}; 32 | for i = 1:length(list) 33 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 34 | Leiter_List = [Leiter_List, {list(i).name(1:end-4)}]; 35 | end 36 | end 37 | if isempty(Leiter_List) 38 | Leiter_List = [{'-'}]; 39 | end 40 | end 41 | 42 | % Magnet Materialien laden 43 | list = dir('5_Materialien/3_Magnet'); 44 | if isempty(list) 45 | Magnet_List = [{'-'}]; 46 | else 47 | Magnet_List = {}; 48 | for i = 1:length(list) 49 | if(length(list(i).name)>4 && strcmp(list(i).name(end-3:end),'.mat')) 50 | Magnet_List = [Magnet_List, {list(i).name(1:end-4)}]; 51 | end 52 | end 53 | if isempty(Magnet_List) 54 | Magnet_List = [{'-'}]; 55 | end 56 | end 57 | 58 | % Maschinenausfuehrung 59 | opt.Maschinenausfuehrung = [{'SPMSM'}; {'IPMSM (eingelassen)'}; {'IPMSM (tangential)'}; {'IPMSM (V-Form)'}]; 60 | 61 | % Schaltung 62 | opt.Schaltung = [{'Stern'}; {'Dreieck'}]; 63 | 64 | % Spulenform Stator 65 | opt.Spulenform_Stator = [{'Runddraht'}];% {'Formspule- oder Stab'}]; 66 | 67 | % Spulenform Rotor 68 | opt.Spulenform_Rotor = [{'-'}]; 69 | 70 | % Nutform Stator 71 | opt.Nutform_Stator = [{'Trapezform (eckig)'}];% {'Trapezform (rund)'}]; 72 | 73 | % Nutform Rotor 74 | opt.Nutform_Rotor = [{'-'}]; 75 | 76 | % Kuehlung Stator 77 | opt.Kuehlungsart = [{'Luft (indirekt)'}; {'Wasser (direkt)'}]; 78 | 79 | % Eisenmaterial Stator 80 | opt.Stator_Eisenmaterial.String = Elektroblech_List; 81 | 82 | % Leitermaterial Stator 83 | opt.Stator_Leitermaterial.String = Leiter_List; 84 | 85 | % Eisenmaterial Rotor 86 | opt.Rotor_Eisenmaterial.String = Elektroblech_List; 87 | 88 | % Leitermaterial Rotor 89 | opt.Rotor_Leitermaterial.String = [{'-'}]; 90 | 91 | % Magnetmaterial Rotor 92 | opt.Rotor_Magnetmaterial.String = Magnet_List; 93 | 94 | % Modus Wicklungsauslegung 95 | opt.Mode_Wicklung = [{'Klassisch'}; {'Optimierung'}; {'Manuell'}]; 96 | 97 | % Optimierungsziel Wicklung 98 | opt.Wicklungstyp = [{'A'}; {'B'}; {'C'}]; 99 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/1_Misc/Vorlage_Ergebnisse.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/1_Misc/Vorlage_Ergebnisse.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_165706/1_Entwurf/Entwurf_ASM_20191216_165706.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_165706/1_Entwurf/Entwurf_ASM_20191216_165706.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_165706/1_Entwurf/Entwurf_ASM_20191216_165706.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_165706/1_Entwurf/Entwurf_ASM_20191216_165706.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_170055/1_Entwurf/Entwurf_ASM_20191216_170055.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_170055/1_Entwurf/Entwurf_ASM_20191216_170055.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_170055/1_Entwurf/Entwurf_ASM_20191216_170055.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/ASM_data_20191216_170055/1_Entwurf/Entwurf_ASM_20191216_170055.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20191217_145108/1_Entwurf/Entwurf_PMSM_20191217_145108.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20191217_145108/1_Entwurf/Entwurf_PMSM_20191217_145108.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20191217_145108/1_Entwurf/Entwurf_PMSM_20191217_145108.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20191217_145108/1_Entwurf/Entwurf_PMSM_20191217_145108.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131510/1_Entwurf/Entwurf_PMSM_20200207_131510.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131510/1_Entwurf/Entwurf_PMSM_20200207_131510.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131510/1_Entwurf/Entwurf_PMSM_20200207_131510.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131510/1_Entwurf/Entwurf_PMSM_20200207_131510.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131725/1_Entwurf/Entwurf_PMSM_20200207_131725.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131725/1_Entwurf/Entwurf_PMSM_20200207_131725.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131725/1_Entwurf/Entwurf_PMSM_20200207_131725.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131725/1_Entwurf/Entwurf_PMSM_20200207_131725.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/1_Entwurf/Entwurf_PMSM_20200207_131749.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/1_Entwurf/Entwurf_PMSM_20200207_131749.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/1_Entwurf/Entwurf_PMSM_20200207_131749.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/1_Entwurf/Entwurf_PMSM_20200207_131749.xlsx -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/2_Analyse/KennfeldMaschine_Gesamtwirkungsgrad.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/2_Analyse/KennfeldMaschine_Gesamtwirkungsgrad.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/2_Analyse/PMSM_350_5050_8837_800_Kennfeld_Gesamtwirkungsgrad.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/3_Ergebnisse/PMSM_data_20200207_131749/2_Analyse/PMSM_350_5050_8837_800_Kennfeld_Gesamtwirkungsgrad.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/FTM_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/FTM_Logo.png -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (V-Form).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (V-Form).jpg -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (eingelassen).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (eingelassen).jpg -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (tangential).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/IPMSM (tangential).jpg -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/SPMSM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/SPMSM.jpg -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/TUM_Logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/1_Misc/TUM_Logo.jpeg -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/GUI_Analyse.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/GUI_Analyse.fig -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/4_GUI/GUI_Entwurf.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/4_GUI/GUI_Entwurf.fig -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/M250-35A.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/M250-35A.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/M800-50A.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/M800-50A.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/VACOFLUX 48.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/VACOFLUX 48.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/VACOFLUX 50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/1_Elektroblech/VACOFLUX 50.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Aluminiumdraht.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Aluminiumdraht.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Aluminiumguss.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Aluminiumguss.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Kupfer.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/2_Leiter/Kupfer.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/3_Magnet/VACODYM 238 TP.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/3_Magnet/VACODYM 238 TP.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/3_Magnet/VACOMAX 225 TP.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/3_Magnet/VACOMAX 225 TP.mat -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/Vorlage_Leiter.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Hinweis: Um neue Dateien fuer Leiter zu erzeugen muss ein struct mit den 11 | % Eintraegen 12 | % - Bezeichnung 13 | % - rho_Fe 14 | % - rho_20 15 | % - alpha 16 | % angelegt werden (siehe Kupfer). Anschliessend muss das Skript 17 | % nur noch ausgefuehrt werden. 18 | 19 | clear data 20 | 21 | %% Kupfer 22 | %{% 23 | 24 | % Bezeichnung 25 | data.Bezeichnung = 'Kupfer'; 26 | 27 | % Dichte des Leiterwerkstoffs rho_Le [kg/m^3] 28 | data.rho_Le = 8940; 29 | 30 | % Richtwert spezifischer Widerstand rho_20 bei 20°C fuer Kupferdraht [mm^2/S*m] 31 | % Quelle: [Mueller08, S.435 - Tabelle 6.3.1] 32 | data.rho_20 = 1/58; 33 | 34 | % Temperaturbeiwert alpha fuer Kupferdraht [1/K] 35 | % Quelle: [Mueller08, S.435] 36 | data.alpha = 0.392 * 10e-3; 37 | 38 | %} 39 | 40 | %% Aluminiumdraht 41 | %{ 42 | 43 | % Bezeichnung 44 | data.Bezeichnung = 'Aluminiumdraht'; 45 | 46 | % Dichte des Leiterwerkstoffs rho_Fe [kg/m^3] 47 | data.rho_Le = 2700; 48 | 49 | % Richtwert spezifischer Widerstand rho_20 bei 20°C fuer Aluminiumdraht [mm^2/S*m] 50 | % Quelle: [Mueller08, S.435 - Tabelle 6.3.1] 51 | data.rho_20 = 1/37; 52 | 53 | % Temperaturbeiwert alpha fuer Aluminiumdraht [1/K] 54 | % Quelle: [Mueller08, S.435] 55 | data.alpha = 0.4 * 10e-3; 56 | 57 | %} 58 | 59 | %% Aluminiumguss 60 | %{ 61 | 62 | % Bezeichnung 63 | data.Bezeichnung = 'Aluminiumguss'; 64 | 65 | % Dichte des Leiterwerkstoffs rho_Fe [kg/m^3] 66 | data.rho_Le = 2700; 67 | 68 | % Richtwert spezifischer Widerstand rho_20 bei 20°C fuer Aluminiumdraht [mm^2/S*m] 69 | % Quelle: [Mueller08, S.435 - Tabelle 6.3.1] 70 | data.rho_20 = 1/30; 71 | 72 | % Temperaturbeiwert alpha fuer Aluminiumdraht [1/K] 73 | % Quelle: [Mueller08, S.435] 74 | data.alpha = 0.4 * 10e-3; 75 | 76 | %} 77 | 78 | %% Datei erzeugen 79 | path = ['5_Materialien/2_Leiter/', data.Bezeichnung]; 80 | save(path,'data'); 81 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/5_Materialien/Vorlage_Magnet.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | % Hinweis: Um neue Dateien fuer Magnete zu erzeugen muss ein struct mit den 11 | % Eintraegen 12 | % - Bezeichnung 13 | % - rho_Mag 14 | % - B_r 15 | % - mu_r 16 | % - rho_el 17 | % - H_c 18 | % - TK_B_r 19 | % angelegt werden (siehe VACOMAX 225 TP). Anschliessend muss das 20 | % Skript nur noch ausgefuehrt werden. 21 | 22 | clear data 23 | 24 | %% VACOMAX 225 TP (Samarium-Kobalt-Legierung) 25 | %{% 26 | % Quelle: [https://www.vacuumschmelze.de/de/produkte/dauermagnete-systeme/dauermagnete/sm-co/vacomax/vacomax-225-tp.html] 27 | 28 | % Bezeichnung 29 | data.Bezeichnung = 'VACOMAX 225 TP'; 30 | 31 | % Dichte des Leiterwerkstoffs rho_Mag [kg/m^3] 32 | data.rho_Mag = 7500; 33 | 34 | % Magnetische Remanenzinduktion [T] 35 | data.B_r = 1.07; 36 | 37 | % Relative Permeabilitaet [-] 38 | data.mu_r = 1.03; 39 | 40 | % Spezifischer elektrischer Widerstand [Ohm*mm^2/m] 41 | data.rho_el = 0.65; % zwischen 0.65 und 0.95 42 | 43 | % Koerzitivfeldstaerke [A/m] 44 | data.H_c = 879e3; 45 | 46 | % Temperaturkoeffizient der magnetischen Remanenzinduktion [%/°C] 47 | % V/A: RT = 100°C 48 | data.TK_B_r = -0.030; 49 | 50 | %} 51 | 52 | %% VACODYM 238 TP (Nd-Fe-B Basis) 53 | %{ 54 | % Quelle: [https://www.vacuumschmelze.de/de/produkte/dauermagnete-systeme/dauermagnete/nd-fe-b/vacodym/vacodym-238-tp.html] 55 | 56 | % Bezeichnung 57 | data.Bezeichnung = 'VACODYM 238 TP'; 58 | 59 | % Dichte des Leiterwerkstoffs rho_Mag [kg/m^3] 60 | data.rho_Mag = 7500; 61 | 62 | % Magnetische Remanenzinduktion [T] 63 | data.B_r = 1.37; 64 | 65 | % Relative Permeabilitaet [-] 66 | data.mu_r = 1.03; 67 | 68 | % Spezifischer elektrischer Widerstand [Ohm*mm^2/m] 69 | % V/A: Widerstand parallel zu magnetischer Vorzugsrichtung 70 | data.rho_el = 1.4; % zwischen 1.4 und 1.6 71 | 72 | % Koerzitivfeldstaerke [A/m] 73 | data.H_c = 1058e3; 74 | 75 | % Temperaturkoeffizient der magnetischen Remanenzinduktion [%/°C] 76 | % V/A: RT = 100°C 77 | data.TK_B_r = -0.111; 78 | 79 | %} 80 | 81 | %% Datei erzeugen 82 | path = ['5_Materialien/3_Magnet/', data.Bezeichnung]; 83 | save(path,'data'); 84 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/6_Extern/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_close.m: -------------------------------------------------------------------------------- 1 | function dxf_close(FID) 2 | %DXF_CLOSE Close DXF file. 3 | % DXF_CLOSE(FID) closes the DXF file opened with DXF_OPEN command. 4 | % 5 | % See also DXF_OPEN 6 | 7 | % Copyright 2010-2011 Grzegorz Kwiatek 8 | % $Revision: 1.1.2 $ $Date: 2011.08.25 $ 9 | 10 | try 11 | fprintf(FID.fid,'0\nENDSEC\n0\nEOF\n'); 12 | fclose(FID.fid); 13 | catch exception 14 | if FID.fid >= 0 15 | fclose(FID.fid); 16 | end 17 | rethrow(exception); 18 | end -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_marker.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_marker(FID, markertype, X, Y, Z, varargin) 2 | %DXF_MARKER Draw a set of markers. 3 | % DXF_MARKER(FID, markertype, X, Y, Z) writes markers into DXF file. 4 | % FID is a valid DXFLIB structure created with DXF_OPEN routine. 5 | % markertype is a valid marker type of the following type: 6 | % 'o' - circle, 7 | % 'x' - x sign, 8 | % '+' - plus sign, 9 | % '^' - triangle. 10 | % X, Y and Z are vectors or matrices of the same size containing 11 | % coordinates of points in 3D space. The default size of marker is 1. 12 | % 13 | % DXF_MARKER(..., SIZE) allows to specify size of marker(s). If SIZE is 14 | % a scalar, all markers have the same size according to the SIZE value 15 | % specified. If SIZE is a matrix of size equal to X, Y or Z, each 16 | % marker is rescaled according to corresponding SIZE value. 17 | % 18 | % See also DXF_POLYLINE, DXF_POINT, DXF_PRIMITIVE. 19 | 20 | % Copyright 2008-2011 Grzegorz Kwiatek 21 | % $Revision: 1.0.3 $ $Date: 2011.11.17 $ 22 | 23 | try 24 | 25 | % align matrices 26 | X=X(:); 27 | Y=Y(:); 28 | Z=Z(:); 29 | 30 | if nargin == 5 31 | SIZE = ones(size(X)); 32 | elseif nargin == 6 33 | SIZE = varargin{1}; 34 | end 35 | 36 | if isscalar(SIZE) 37 | SIZE = SIZE * ones(size(X)); 38 | end 39 | 40 | switch lower(markertype) 41 | case 'o' 42 | for i=1:length(X) 43 | fprintf(FID.fid,'0\n'); 44 | fprintf(FID.fid,'CIRCLE\n'); 45 | dxf_print_layer(FID); 46 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 47 | fprintf(FID.fid,'40\n'); 48 | fprintf(FID.fid,[sprintf('%d',SIZE(i)) '\n']); 49 | end 50 | case 'x' 51 | a = sqrt(2); 52 | for i=1:length(X) 53 | XX = X(i) + [-a -a; a a]*SIZE(i)/2; 54 | YY = Y(i) + [ a -a; -a a]*SIZE(i)/2; 55 | ZZ = Z(i) + [0 0; 0 0]; 56 | dxf_polyline(FID, XX, YY, ZZ); 57 | end 58 | case '+' 59 | for i=1:length(X) 60 | a = SIZE(i) / 2 ; 61 | XX = X(i) + [0 a; 0 -a]; 62 | YY = Y(i) + [-a 0; a 0]; 63 | ZZ = Z(i) + [0 0; 0 0]; 64 | dxf_polyline(FID, XX, YY, ZZ); 65 | end 66 | case '^' 67 | for i=1:length(X) 68 | h = sqrt(3) / 2 * SIZE(i); 69 | a = SIZE(i); 70 | XX = X(i) + [-0.5*a 0 0.5*a -0.5*a]'; 71 | YY = Y(i) + [-h/3 2*h/3 -h/3 -h/3]'; 72 | ZZ = Z(i) + [0 0 0 0]'; 73 | dxf_polyline(FID, XX, YY, ZZ); 74 | end 75 | end 76 | 77 | catch exception 78 | if FID.fid >= 0 79 | fclose(FID.fid); 80 | end 81 | rethrow(exception); 82 | end 83 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_open.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_open(fname) 2 | %DXF_OPEN Open DXF file. 3 | % Fid = DXF_OPEN(fname) opens DXF file for writing and writes the DXF 4 | % file header. The function returns the matlab structure 'Fid' with 5 | % various parameters used later by other drawing functions. One must 6 | % use this structure in the subsequent calls to drawing routines. 7 | % 8 | % REMARKS 9 | % The assumed units are meters. 10 | % 11 | % See also DXF_CLOSE 12 | 13 | % Copyright 2010-2011 Grzegorz Kwiatek 14 | % $Revision: 1.1.4 $ $Date: 2011.11.15 $ 15 | 16 | try 17 | 18 | fid = fopen(fname,'w'); 19 | 20 | % Setup default values. 21 | FID.filename = fname; 22 | FID.fid = fid; 23 | FID.show = false; 24 | FID.dump = true; 25 | 26 | FID.layer = 0; 27 | FID.color = 255; 28 | FID.textheight = 1; 29 | FID.textrotation = 0; 30 | FID.textthickness = 0; 31 | FID.textalignment = 0; 32 | FID.textvalignment = 0; 33 | FID.textextrusion = [0 0 1]; 34 | FID.textobliqueangle = 0; 35 | 36 | fprintf(fid,'0\nSECTION\n'); 37 | fprintf(fid,'2\nHEADER\n'); 38 | fprintf(fid,'9\n$ACADVER\n1\nAC1006\n'); % Default units: meters. 39 | fprintf(fid,'9\n$INSUNITS\n70\n6\n'); % Default units: meters. 40 | fprintf(fid,'0\nENDSEC\n'); 41 | 42 | % Start entities or produce TABLE first. 43 | %if nargin ~= 1 44 | % dxf_layertable(FID, varargin); 45 | %end 46 | 47 | % Dump entities section. 48 | fprintf(FID.fid,'0\nSECTION\n'); 49 | fprintf(FID.fid,'2\nENTITIES\n'); 50 | 51 | catch exception 52 | if FID.fid >= 0 53 | fclose(FID.fid); 54 | end 55 | rethrow(exception); 56 | end 57 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_point.m: -------------------------------------------------------------------------------- 1 | function dxf_point(FID, X, Y, Z, varargin) 2 | %DXF_POINT Store points in DXF file. 3 | % DXF_POINT(FID, X, Y, Z) writes 3D points into DXF file. 4 | % FID is a valid DXFLIB structure created with DXF_OPEN routine. 5 | % X, Y and Z are vectors or matrices of the same size containing 6 | % coordinates of points in 3D space. 7 | % 8 | % DXF_POINT(..., COLOR) where COLOR is either n-by-1 ACI color vector or 9 | % n-by-3 RGB color matrix allows to specify color for each individual 10 | % point. 11 | % 12 | % See also DXF_OPEN, DXF_CLOSE, DXF_RGB2ACI, DXF_ACI2RGB, DXF_POLYLINE. 13 | 14 | % Copyright 2008-2011 Grzegorz Kwiatek 15 | % $Revision: 1.3.0 $ $Date: 2011.11.17 $ 16 | 17 | try 18 | 19 | if nargin == 5 20 | % color information included 21 | C = varargin{1}; 22 | if size(C,2) == 3 23 | C = dxf_rgb2aci(C); 24 | else 25 | throw(MException('dxflib:dxf_point', 'Color vector must be m-by-3 or m-by-1.')); 26 | end 27 | C = C(:); 28 | elseif nargin == 4 29 | else 30 | throw(MException('dxflib:dxf_point', 'Inapropriate number of input arguments.')); 31 | end 32 | 33 | X = X(:); 34 | Y = Y(:); 35 | Z = Z(:); 36 | 37 | if FID.show 38 | set(gca,'NextPlot','add'); 39 | if nargin == 4 40 | % Only one color per whole sequence. 41 | plot3(X,Y,Z,'.','Color',dxf_aci2rgb(FID.color)); 42 | elseif nargin == 5 43 | % Color per point. 44 | scatter3(X,Y,Z,4,dxf_aci2rgb(C)); 45 | end 46 | set(gca,'NextPlot','replace'); 47 | end 48 | 49 | if FID.dump 50 | if nargin == 4 51 | for i=1:length(X) 52 | fprintf(FID.fid,'0\n'); 53 | fprintf(FID.fid,'POINT\n'); 54 | dxf_print_layer(FID); 55 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 56 | end 57 | else 58 | currentcolor = FID.color; 59 | for i=1:length(X) 60 | fprintf(FID.fid,'0\n'); 61 | fprintf(FID.fid,'POINT\n'); 62 | FID.color = C(i); 63 | dxf_print_layer(FID); 64 | dxf_print_point(FID,0,X(i),Y(i),Z(i)); 65 | end 66 | FID.color = currentcolor; 67 | end 68 | end 69 | 70 | catch exception 71 | if FID.fid >= 0 72 | fclose(FID.fid); 73 | end 74 | rethrow(exception); 75 | end -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_polyline.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_polyline(FID, X, Y, Z) 2 | %DXF_POLYLINE Store lines in DXF file. 3 | % DXF_POLYLINE(FID, X, Y, Z) writes polylines into DXF file. 4 | % FID is valid DXFLIB structure created with DXF_OPEN routine. 5 | % X, Y and Z are matrices of the same size containing coordinates of 6 | % points for polylines. One separate line per column of matrix is 7 | % drawn. 8 | % 9 | % See also DXF_OPEN, DXF_CLOSE. 10 | 11 | % Copyright 2011 Grzegorz Kwiatek 12 | % $Revision: 1.2.0 $ $Date: 2011.11.17 $ 13 | 14 | try 15 | 16 | if FID.show 17 | line(X,Y,Z,'Color',dxf_aci2rgb(FID.color)); 18 | end 19 | 20 | if FID.dump 21 | for i=1:size(X,2) % for each column! 22 | 23 | fprintf(FID.fid,'0\n'); 24 | fprintf(FID.fid,'POLYLINE\n'); 25 | 26 | dxf_print_layer(FID); 27 | fprintf(FID.fid,'66\n'); % entities follow (not necessary) 28 | fprintf(FID.fid,'1\n'); 29 | dxf_print_point(FID,0,0.0,0.0,0.0); % dummy point before vertices 30 | 31 | % 8 = This is a 3D polyline 32 | % 16 = This is a 3D polygon mesh 33 | % 32 = The polygon mesh is closed in the N direction 34 | % 64 = The polyline is a polyface mesh 35 | 36 | fprintf(FID.fid,'70\n'); 37 | fprintf(FID.fid,'8\n'); 38 | dxf_print_vertex(FID, [X(:,i) Y(:,i) Z(:,i)],32); 39 | dxf_print_seqend(FID); 40 | end % for loop 41 | end 42 | 43 | catch exception 44 | if FID.fid >= 0 45 | fclose(FID.fid); 46 | end 47 | rethrow(exception); 48 | end 49 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_polymesh.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_polymesh(FID, VERTICES, FACES, varargin) 2 | %DXF_POLYMESH Produce DXF polyface mesh from MATLAB patch data. 3 | % DXF_POLYMESH(FID, VERTICES, FACES) creates DXF data of polyface 4 | % mesh based on MATLAB patch data (vertices/faces). 5 | % 6 | % DXF_POLYMESH(..., COLOR) allows to specify color for each FACE. COLOR 7 | % matrix should be of size(FACES,1) (i.e. you can specify only 8 | % per-face color). 9 | % 10 | % See also DXF_POLYLINE. 11 | 12 | % Copyright 2011 Grzegorz Kwiatek 13 | % $Revision: 1.1.0 $ $Date: 2011.11.17 $ 14 | 15 | try 16 | 17 | if FID.show 18 | FVC.faces = FACES; 19 | FVC.vertices = VERTICES; 20 | if nargin == 3 21 | % Show mesh with a constant colour. 22 | FVC.facevertexcdata = repmat(dxf_aci2rgb(FID.color),size(FVC.vertices,1),1); 23 | else 24 | % Show mesh with per-face or per-vertex colouring. 25 | FVC.facevertexcdata = varargin{1}; 26 | end 27 | h = patch(FVC); 28 | %lighting phong; 29 | set(h,'EdgeColor','none'); 30 | %shading interp; 31 | end 32 | 33 | if FID.dump 34 | if nargin == 4 35 | COLOURS = varargin{1}; 36 | end 37 | 38 | fprintf(FID.fid,'0\n'); 39 | fprintf(FID.fid,'POLYLINE\n'); 40 | 41 | dxf_print_layer(FID); 42 | fprintf(FID.fid,'66\n'); % entities follow (not necessary 43 | fprintf(FID.fid,'1\n'); 44 | dxf_print_point(FID,0,0.0,0.0,0.0); % dummy point before vertices 45 | 46 | % 8 = This is a 3D polyline 47 | % 16 = This is a 3D polygon mesh 48 | % 32 = The polygon mesh is closed in the N direction 49 | % 64 = The polyline is a polyface mesh 50 | 51 | fprintf(FID.fid,'70\n'); 52 | fprintf(FID.fid,'64\n'); 53 | 54 | % dump vertices 55 | if nargin == 4 56 | % place for per-vertex colouring, apparently it is not working 57 | % for DXF files. 58 | dxf_print_vertex(FID,VERTICES,128+64); % 64 means polyface mesh. 59 | else 60 | dxf_print_vertex(FID,VERTICES,128+64); 61 | end 62 | 63 | % dump faces 64 | if nargin == 4 65 | % per-face colouring. The size of COLOURS matrix must be the same 66 | % as the size of FACES matrix 67 | dxf_print_vertex(FID, FACES, 128, COLOURS); 68 | else 69 | dxf_print_vertex(FID, FACES, 128); 70 | end 71 | 72 | dxf_print_seqend(FID); 73 | end 74 | catch 75 | fclose(FID.fid); 76 | rethrow(lasterror); 77 | end 78 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_print_layer.m: -------------------------------------------------------------------------------- 1 | function dxf_print_layer(FID) 2 | %DXF_PRINT_LAYER Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2010-2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.3 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'8\n'); % layer, default 0 10 | if isnumeric(FID.layer) 11 | fprintf(FID.fid,'%d\n', FID.layer); 12 | else 13 | fprintf(FID.fid,'%s\n', FID.layer); 14 | end 15 | 16 | % Dump color. 17 | fprintf(FID.fid,'62\n%d\n',FID.color); % color group code. 18 | 19 | catch exception 20 | if FID.fid >= 0 21 | fclose(FID.fid); 22 | end 23 | rethrow(exception); 24 | end -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_print_layertable.m: -------------------------------------------------------------------------------- 1 | function dxf_print_layertable(FID, LAYERS) 2 | %DXF_PRINT_LAYERTABLE Print table containing names of layer. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek 6 | % $Revision: 1.0.0 $ $Date: 2011.11.17 $ 7 | 8 | try 9 | fprintf(FID.fid,'0\n'); 10 | fprintf(FID.fid,'SECTION\n'); 11 | fprintf(FID.fid,'2\n'); 12 | fprintf(FID.fid,'TABLES\n'); 13 | 14 | fprintf(FID.fid,'0\n'); 15 | fprintf(FID.fid,'TABLE\n'); 16 | fprintf(FID.fid,'2\n'); 17 | fprintf(FID.fid,'LAYER\n'); 18 | fprintf(FID.fid,'70\n'); 19 | fprintf(FID.fid,'%d\n', length(LAYERS)+1); 20 | 21 | for i=1:length(LAYERS) 22 | fprintf(FID.fid,'0\n'); 23 | fprintf(FID.fid,'LAYER\n'); 24 | fprintf(FID.fid,'2\n'); 25 | fprintf(FID.fid,'%s\n', LAYERS{i}); % Layer name 26 | fprintf(FID.fid,'70\n'); 27 | fprintf(FID.fid,'64\n'); % Layer flag. 28 | fprintf(FID.fid,'62\n'); 29 | fprintf(FID.fid,'2\n'); % Layer color. 30 | fprintf(FID.fid,'6\n'); 31 | fprintf(FID.fid,'CONTINUOUS\n'); % Layer linetype 32 | end 33 | 34 | fprintf(FID.fid,'0\n'); 35 | fprintf(FID.fid,'ENDTAB\n'); 36 | fprintf(FID.fid,'0\n'); 37 | fprintf(FID.fid,'ENDSEC\n'); 38 | catch exception 39 | if FID.fid >= 0 40 | fclose(FID.fid); 41 | end 42 | error(exception.message); 43 | end 44 | 45 | 46 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_print_point.m: -------------------------------------------------------------------------------- 1 | function dxf_print_point(FID,pointno,x,y,z) 2 | %DXF_PRINT_POINT Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'1%1d\n%1.8g\n2%1d\n%1.8g\n3%1d\n%1.8g\n',pointno,x,pointno,y,pointno,z); 10 | catch exception 11 | if FID.fid >= 0 12 | fclose(FID.fid); 13 | end 14 | rethrow(exception); 15 | end 16 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_print_seqend.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_print_seqend(FID) 2 | %DXF_PRINT_SEQEND Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | fprintf(FID.fid,'0\nSEQEND\n8\n%d\n',FID.layer); 10 | catch exception 11 | if FID.fid >= 0 12 | fclose(FID.fid); 13 | end 14 | rethrow(exception); 15 | end -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_print_vertex.m: -------------------------------------------------------------------------------- 1 | function dxf_print_vertex(FID, VERTICES, vertextype, varargin) 2 | %DXF_PRINT_VERTEX Dump entity properties. 3 | % Internal function: Not usable directly. 4 | % 5 | % Copyright 2011 Grzegorz Kwiatek. 6 | % $Revision: 1.0.0 $ $Date: 2011.08.25 $% 7 | 8 | try 9 | if nargin == 4 10 | % only per-face colouring is accepted. 11 | COLOURS = varargin{1}; 12 | % if COLOURS is (N x 3) matrix, reduce it to ACI colour index table (N x 1). 13 | if size(COLOURS,2) == 3 14 | COLOURS = dxf_rgb2aci(COLOURS); 15 | end 16 | end 17 | 18 | for i=1:size(VERTICES,1) 19 | 20 | fprintf(FID.fid,'0\n'); 21 | fprintf(FID.fid,'VERTEX\n'); 22 | 23 | if vertextype ~= 128 24 | % = 128+64 dump as polyface mesh vertex (called by dxf_polymesh). 25 | % = 32 dump as polyline vertex (called by dxf_polyline) 26 | % Per-vertex colouring does not work for DXF files. 27 | dxf_print_layer(FID); 28 | dxf_print_point(FID,0,VERTICES(i,1),VERTICES(i,2),VERTICES(i,3)); 29 | else 30 | % =128 - dump faces of polyface mesh. 31 | % Setup different per-face colour depending on COLOURS matrix. 32 | currentcolor = FID.color; 33 | if nargin == 4 34 | FID.color = COLOURS(i); 35 | end 36 | dxf_print_layer(FID); 37 | FID.color = currentcolor; 38 | dxf_print_point(FID,0,0,0,0); 39 | end 40 | 41 | % 70 Vertex flags: 42 | % 1 = Extra vertex created by curve-fitting 43 | % 2 = Curve-fit tangent defined for this vertex. A curve-fit tangent direction of 0 may be 44 | % omitted from DXF output but is significant if this bit is set 45 | % 4 = Not used 46 | % 8 = Spline vertex created by spline-fitting 47 | % 16 = Spline frame control point 48 | % 32 = 3D polyline vertex 49 | % 64 = 3D polygon mesh 50 | % 128 = Polyface mesh vertex 51 | 52 | fprintf(FID.fid,'70\n'); 53 | fprintf(FID.fid,'%d\n',vertextype); % layer 54 | 55 | % =128, dump faces of polyface mesh. 56 | if vertextype == 128 57 | fprintf(FID.fid,'71\n'); 58 | fprintf(FID.fid,'%d\n',VERTICES(i,1)); % layer 59 | fprintf(FID.fid,'72\n'); 60 | fprintf(FID.fid,'%d\n',VERTICES(i,2)); % layer 61 | fprintf(FID.fid,'73\n'); 62 | fprintf(FID.fid,'%d\n',VERTICES(i,3)); % layer 63 | if size(VERTICES,2) == 4 64 | fprintf(FID.fid,'74\n'); 65 | fprintf(FID.fid,'%d\n',VERTICES(i,4)); % layer 66 | else 67 | fprintf(FID.fid,'74\n'); 68 | fprintf(FID.fid,'0\n'); % layer 69 | end 70 | end 71 | end 72 | 73 | catch exception 74 | if FID.fid >= 0 75 | fclose(FID.fid); 76 | end 77 | rethrow(exception); 78 | end -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/dxf_set.m: -------------------------------------------------------------------------------- 1 | function FID = dxf_set(FID, varargin) 2 | %DXF_SET Set property. 3 | % DXF_SET(FID, 'PropertyName', 'PropertyValue', ...) sets up property 4 | % in DXF file. 5 | % 6 | % Properties: 7 | % 'Layer' - Layer number, followed by a scalar value in a range 0-256. 8 | % 'Color' - Current color, followed either by a scalar value in a range 9 | % 1-255 (ACI color) or MATLAB color vector [R G B], where 10 | % R,G,B ranges 0-1. [0 0 0] is black, [1 1 1] is white, 11 | % [1 0 0] is pure red, [0 1 0] is pure green and [0 0 1] is 12 | % pure blue. Also ACI value 0 represent BYBLOCK and 256 represent 13 | % BYLAYER (currently both values are not used!) 14 | % 15 | % Copyright 2010-2011 Grzegorz Kwiatek. 16 | % $Revision: 1.1.2 $ $Date: 2011.09.06 $ 17 | 18 | p = inputParser; 19 | p.addRequired('FID', @isstruct); 20 | p.addParamValue('Layer', FID.layer, @(x) ischar(x) || (isnumeric(x) && x > 0) ); 21 | p.addParamValue('Color', FID.color, @(x) (isscalar(x) && x>=0 && x<=256) || (isvector(x) && size(x,1)==1 && size(x,2) ==3) ); 22 | p.addParamValue('TextHeight', FID.textheight, @(x)x >= 0); 23 | p.addParamValue('TextRotation', FID.textrotation, @(x)x >= 0); 24 | p.addParamValue('TextThickness', FID.textthickness, @(x)x >= 0); 25 | p.addParamValue('TextAlignment', FID.textalignment, @(x)x >= 0); 26 | p.addParamValue('TextVAlignment', FID.textvalignment, @(x)x >= 0); 27 | p.addParamValue('TextExtrusion', FID.textextrusion, @(x)(isvector(x) && size(x,1)==1 && size(x,2) ==3)); 28 | p.addParamValue('TextObliqueAngle', FID.textobliqueangle, @(x)x >= 0); 29 | p.parse(FID, varargin{:}); 30 | 31 | FID.layer = p.Results.Layer; 32 | if size(p.Results.Color,2) == 3 33 | FID.color = dxf_rgb2aci(p.Results.Color); 34 | else 35 | FID.color = p.Results.Color; 36 | end 37 | FID.textheight = p.Results.TextHeight; 38 | FID.textrotation = p.Results.TextRotation; 39 | FID.textthickness = p.Results.TextThickness; 40 | FID.textalignment = p.Results.TextAlignment; 41 | FID.textvalignment = p.Results.TextVAlignment; 42 | FID.textextrusion = p.Results.TextExtrusion; 43 | FID.textobliqueangle = p.Results.TextObliqueAngle; 44 | 45 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Grzegorz Kwiatek 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/DXFLib_v0.9.1/readme.txt: -------------------------------------------------------------------------------- 1 | DXFLib 2 | ------------------ 3 | Version 0.9.1 4 | Copyright (c) 2009-2011 Grzegorz Kwiatek, see license.txt file for details. 5 | 6 | Description 7 | ----------- 8 | DXFLib is a simple library written for MATLAB. It allows creating DXF files containing the 9 | following entities: 10 | * Points 11 | * Lines 12 | * Primitives 13 | * Polysurfaces 14 | 15 | The library handles DXF Layers and ACI Colors (RGB colors are converted to ACI counterparts). 16 | 17 | Installation 18 | ------------ 19 | Just unpack m-files to your working directory or create a separate directory and add its location 20 | to MATLAB path. 21 | 22 | Usage 23 | ----- 24 | The easiest is to run dxf_test.m script and then open it in MATLAB editor and compare the generated 25 | DXF files with the code. You'll need any DXF viewer that is capable to handle 3D. I recommend 26 | to use free Bentley View software (http://www.bentley.com/en-US/Products/Bentley+View/). The 27 | advantage of using Bentley View is that this software is capable to PRINT 3-dimensional PDF 28 | files (the examples of DXF/PDF files are included in the library). 29 | 30 | Contact 31 | ------- 32 | Author: Grzegorz Kwiatek, 33 | Mailto: taquart@gmail.com 34 | DXFLib page: http://www.sejsmologia-gornicza.pl/?page_id=172 -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/6_Extern/spider_plot/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Moses 2 | Copyright (c) 2011, David Said 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the distribution 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/7_Doku/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/MEAPA_Machine Design Tool for ASM and PSM/7_Doku/.DS_Store -------------------------------------------------------------------------------- /MEAPA_Machine Design Tool for ASM and PSM/Main.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Muenchen - Lehrstuhl fuer Fahrzeugtechnik (FTM) 3 | % ------------------------------------------------------------------------- 4 | % Modell fuer den Entwurf und die Analyse einer PMSM oder ASM (MEAPA) 5 | % ------------------------------------------------------------------------- 6 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 7 | % Jonathan Erhard 8 | % ------------------------------------------------------------------------- 9 | 10 | %% Literaturverzeichnis 11 | % [Binder12] - Andraeas Binder, Elektrische Maschinen und Antriebe - Grundlagen, Betriebsverhalten, 978-3-540-71849-9 12 | % [Meyer09] - Wolfgang Meyer, Automatisierter Entwurf elektromechanischer Wandler, 978-3-897-91406-3 13 | % [Meyer18] - Wolfgang Meyer, Entwurf elektrischer Maschinen, Vorlesungsskriptum 14 | % [Mueller08] - Germar Mueller, Berechnung elektrischer Maschinen, 3-527-40525-9 15 | % [Mueller14] - Germar Mueller, Grundlagen elektrischer Maschinen, 3-527-41205-1 16 | % [Pyr14] - Juha Pyrhoenen, Design of rotating electrical machines, 978-1-118-58157-5 17 | 18 | %% Abkuerzungsverzeichnis 19 | % V/A = Vereinfachung / Annahme 20 | % Index 1: Stator 21 | % Index 2: Rotor 22 | 23 | %% Initialisierung Skript 24 | clear all, close all force, home 25 | 26 | % Pfade wiederherstellen 27 | restoredefaultpath; 28 | path(pathdef) 29 | addpath(genpath(pwd)); 30 | 31 | % Auswahl mit oder ohne GUI 32 | Enable_GUI = 1; 33 | 34 | %% Start 35 | if(Enable_GUI) 36 | GUI_Entwurf; 37 | else 38 | % Nennleistung P_N [W] 39 | rated.P_N = 3000; 40 | % Nenndrehzahl n_N [U/min] 41 | rated.n_N = 1500; 42 | % Nennspannung U_N [V] 43 | rated.U_N = 400; 44 | % Polpaarzahl p [-] 45 | rated.p = 2; 46 | % Nennfrequenz f_N [-] 47 | rated.f_N = (rated.p * rated.n_N) / 60; 48 | % Strangzahl m [-] 49 | rated.m = 3; 50 | 51 | [Entwurf, Analyse] = MEAPA_Skript(rated); 52 | end 53 | 54 | clear RESTOREDEFAULTPATH_EXECUTED Enable_GUI rated 55 | -------------------------------------------------------------------------------- /PMSM Tool/Auslegung_PMSM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/Auslegung_PMSM.m -------------------------------------------------------------------------------- /PMSM Tool/Ergebnisse/Vorlage_Ergebnisse.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/Ergebnisse/Vorlage_Ergebnisse.xlsx -------------------------------------------------------------------------------- /PMSM Tool/GUI/GUI_Auslegung_PMSM.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/GUI/GUI_Auslegung_PMSM.fig -------------------------------------------------------------------------------- /PMSM Tool/GUI/GUI_Auslegung_PMSM.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/GUI/GUI_Auslegung_PMSM.m -------------------------------------------------------------------------------- /PMSM Tool/GUI/GUI_Kennfeld_PMSM.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/GUI/GUI_Kennfeld_PMSM.fig -------------------------------------------------------------------------------- /PMSM Tool/GUI/IPMSM (1-schichtig, radial).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/GUI/IPMSM (1-schichtig, radial).jpg -------------------------------------------------------------------------------- /PMSM Tool/GUI/SPMSM (radial).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/GUI/SPMSM (radial).jpg -------------------------------------------------------------------------------- /PMSM Tool/Hilfsfunktionen/export_excel.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | function export_table = export_excel(input) 13 | var = fieldnames(input); 14 | 15 | for i = 1:length(var) 16 | export_struct{i,1} = input.(var{i}); 17 | end 18 | 19 | export_table = table(export_struct,'VariableNames',{'var'},'RowNames',var); 20 | end -------------------------------------------------------------------------------- /PMSM Tool/Hilfsfunktionen/ggT_fun.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | function x = ggT_fun(a,b) 13 | while b ~= 0 14 | z = mod(a,b); 15 | a = b; 16 | b = z; 17 | end 18 | x = a; 19 | end -------------------------------------------------------------------------------- /PMSM Tool/Hilfsfunktionen/plot_Kennfeld.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | %% Plot 13 | hold(handles.axes_plot,'off'); 14 | handles.axes_plot.Visible = 'on'; 15 | plot(handles.axes_plot,kenn.omega_k_vec/prim.p/(2*pi)*60,kenn.M_max_vec); 16 | hold(handles.axes_plot,'on'); 17 | colorbar(handles.axes_plot,'EastOutside'); 18 | grid(handles.axes_plot,'on'); 19 | handles.axes_plot.Layer = 'top'; 20 | xlabel(handles.axes_plot,'Rot. Speed n in $\frac{U}{min}$','interpreter','latex','FontSize', 15); 21 | ylabel(handles.axes_plot,'Torque M in Nm','interpreter','latex','FontSize', 15); -------------------------------------------------------------------------------- /PMSM Tool/Hilfsfunktionen/plot_Nut.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TUMFTM/Electric_Machine_Design/25c1ecc7b815e18425e0dadec8797b91412122b8/PMSM Tool/Hilfsfunktionen/plot_Nut.m -------------------------------------------------------------------------------- /PMSM Tool/Main.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | %% Literature 13 | % [Binder12] - Andreas Binder, Elektrische Maschinen und Antriebe - Grundlagen, Betriebsverhalten, 978-3-540-71849-9 14 | % [Ionel98] - D.M. Ionel, Design considerations for permanent magnet synchronous motors for flux weakening applications, http://dx.doi.org/10.1049/ip-epa:19982171 15 | % [Meyer09] - Wolfgang Meyer, Automatisierter Entwurf elektromechanischer Wandler, 978-3-897-91406-3 16 | % [Meyer18] - Wolfgang Meyer, Entwurf elektrischer Maschinen, Vorlesungsskriptum 17 | % [Mueller08] - Germar Mueller, Berechnung elektrischer Maschinen, 3-527-40525-9 18 | % [Mueller14] - Germar Mueller, Grundlagen elektrischer Maschinen, 3-527-41205-1 19 | % [Pyr14] - Juha Pyrhoenen, Design of rotating electrical machines, 978-1-118-58157-5 20 | 21 | %% Model Structure 22 | % 1 - Preprocessing 23 | % 2 - Design process PMSM 24 | % 3 - Efficiency map calculation PMSM 25 | 26 | %% 1 - Preprocessing 27 | % The input data of the PMSM is entered via a GUI. Starting from 28 | % this data set, the entire design of the machine and the efficiency map calculation is carried out. 29 | 30 | % Initialization Script 31 | clear all, close all force, home 32 | path(pathdef) 33 | addpath(genpath(pwd)); 34 | 35 | % Start GUI 36 | handles = GUI_Auslegung_PMSM; 37 | 38 | % Termination by user 39 | if(~isstruct(handles)) 40 | error('Operation aborted by user!'); 41 | else 42 | % Write struct in machine data 43 | Maschinendaten.Bemessungsgroessen.Primaerparameter = handles.Primaerparameter; 44 | Maschinendaten.Bemessungsgroessen.Sekundaerparameter = handles.Sekundaerparameter; 45 | Maschinendaten.Richtwerte = handles.Richtwerte; 46 | Maschinendaten.Optionen = handles.Optionen; 47 | Maschinendaten.Optionen.axes_Animate_Nut = handles.axes_Animate_Nut; 48 | end 49 | 50 | % Reservation of storage space 51 | Maschinendaten.Entwurf = struct; 52 | Maschinendaten.Kennfeld = struct; 53 | 54 | %% 2 - Design process PMSM 55 | % This function executes the design of the PMSM. More information about the calculations can be found in the function. 56 | 57 | [Maschinendaten] = Auslegung_PMSM(Maschinendaten, handles); 58 | 59 | %% 3 - Efficiency map calculation PMSM 60 | % This function executes the Efficiency map calculation of the PMSM. More information about the calculations can be found in the function. 61 | 62 | [Maschinendaten, handles_Kennfeld] = Kennfeld_PMSM(Maschinendaten); 63 | -------------------------------------------------------------------------------- /PMSM Tool/Motormodell/Motormodell.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | function [i_d_mesh, i_q_mesh, M_max_vec, M_max_mesh, omega_k_mesh] = Motormodell(prim, ent, reg, omega_k_vec, tics_M) 13 | % Motor model - This function calculates the full load characteristic and the currents 14 | % and voltages of a PMSM. 15 | % In the motor model function, the full load characteristic curve is first displayed under 16 | % observance of current and voltage limits. This is then used to calculate 17 | % the currents and voltages for operation in the permissible range 18 | 19 | %% Create torque vector 20 | M_vec = linspace(0, ent.M_N, tics_M); 21 | 22 | %% Create speed/torque grid 23 | [omega_k_mesh, M_mesh] = meshgrid(omega_k_vec, M_vec); 24 | 25 | %% Calculation of full load curve (calculate maximum torque for speed vector) 26 | % Maximum torque under auxiliary conditions 27 | [i_s, beta] = Optimierung_M(prim, ent, reg, omega_k_mesh); 28 | M_max_vec = 1.5.*prim.p.*((ent.L_d-ent.L_q).*i_s.^2.*0.5.*sin(2.*beta) + ent.psi_PM.*i_s.*sin(beta)); 29 | 30 | %% Create torque vector 31 | M_vec = linspace(0, max(M_max_vec), tics_M); 32 | 33 | %% Create speed/torque grid 34 | [omega_k_mesh, M_max_mesh] = meshgrid(omega_k_vec, M_vec); 35 | 36 | %% Adjustment of map range to full load curve 37 | % Tolerance for max torque (numerical inaccuracy) 38 | tol = 1e-4; 39 | % Filtering operating points that cannot be reached 40 | for i = 1:length(omega_k_mesh(1,:)) 41 | M_max_mesh(M_max_mesh(:,i)>M_max_vec(i)+tol,i) = NaN; 42 | end 43 | 44 | %% Calculation of currents for given speeds and torques 45 | % Minimization of currents under auxiliary conditions 46 | [i_d_mesh, i_q_mesh] = Optimierung_i(prim, ent, reg, omega_k_mesh, M_max_mesh); -------------------------------------------------------------------------------- /PMSM Tool/Motormodell/Optimierung_M.m: -------------------------------------------------------------------------------- 1 | % ------------------------------------------------------------------------- 2 | % TU Munich - Institute of Automotive Technology 3 | % ------------------------------------------------------------------------- 4 | % Model for the design of a permanent magnet excited synchronous machine and 5 | % subsequent efficiency map calculation 6 | % ------------------------------------------------------------------------- 7 | % Autor: Svenja Kalt (kalt@ftm.mw.tum.de) 8 | % Jonathan Erhard 9 | % Prof. Markus Lienkamp 10 | % ------------------------------------------------------------------------- 11 | 12 | function [i_s, beta] = Optimierung_M(prim, ent, reg, omega_mesh) 13 | %Optimization maximizes torque under constraints and limits 14 | % Notation: i_s = x(1), beta = x(2) 15 | % Bound: 0<=i_s<=i_max, 0<=beta<=pi 16 | % Linear Inequality Constraint: none 17 | % Linear Equality Constraint: none 18 | % Nonlinear constraints: see function nonlcon_fun 19 | 20 | %% Preprocessing 21 | % Minimization function 22 | fun = @(x) -1.5.*prim.p.*((ent.L_d-ent.L_q).*x(1).^2.*0.5.*sin(2.*x(2)) + ent.psi_PM.*x(1).*sin(x(2))); 23 | % initial value 24 | x0 = [0 0]; 25 | % Bound Constraints 26 | lb = [0 0]; 27 | ub = [reg.i_max pi]; 28 | % Linear Inequality Constraint 29 | A = []; 30 | b = []; 31 | % Linear Equality Constraint 32 | Aeq = []; 33 | beq = []; 34 | % Nonlinear Constraints 35 | nonlcon = @nonlcon_fun1; 36 | % Options for Optimization 37 | options = optimoptions(@fmincon,'Display','off','Algorithm','interior-point'); 38 | 39 | % Allocate memory 40 | i_s = zeros(length(omega_mesh(1,:)),1); 41 | beta = zeros(length(omega_mesh(1,:)),1); 42 | 43 | %% Solving 44 | tic 45 | for j = 1:length(omega_mesh(1,:)) 46 | omega_k = omega_mesh(1,j); 47 | % Minimization of initial value [0,0] 48 | [x_sol,~,exitflag,~] = fmincon(fun, x0, A, b, Aeq, beq, lb, ub, ... 49 | @(x) nonlcon(x, reg.u_max, ent.L_d, ent.L_q, ent.R_s, omega_k, ent.psi_PM), options); 50 | if(exitflag~=1 && exitflag~=2) 51 | % Current is set to inf if no result is found 52 | i_s(j) = inf; 53 | beta(j) = inf; 54 | else 55 | % Assign values when result is found 56 | i_s(j) = x_sol(1); 57 | beta(j) = x_sol(2); 58 | end 59 | end 60 | toc 61 | 62 | end 63 | 64 | function [c,ceq] = nonlcon_fun1(x, u_max, L_d, L_q, R_s, omega_k, psi_PM) 65 | %nonlcon_fun Definition of nonlinear constraints 66 | % Secondary condition 1: Voltage limit 67 | 68 | c = (R_s*x(1)*cos(x(2)) - omega_k*L_q*x(1)*sin(x(2)))^2 + (R_s*x(1)*sin(x(2)) + omega_k*L_d*x(1)*cos(x(2)) + omega_k*psi_PM)^2 - u_max^2; 69 | ceq = []; 70 | end -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Electric_Machine_Design 2 | This Tool enables a holistic electric machine design and efficiency diagram generation using few input parameters. 3 | 4 | ## How-To 5 | The tool is made up of 2 main Meta-Models: 6 | - Electric Machine Design 7 | - Efficiency Diagram Generation 8 | 9 | In order to start the overall simulation, you have to run the MATLAB editor in the file Main.m. 10 | This starts the GUI-Interface, where you can insert the main input parameters of the desired electric machine. 11 | 12 | With the start-button the first Meta-Model for the electric machine design is inititated. This step takes about 3 seconds and calculates the main dimensions, boundary conditions of the active parts, the rotor and stator design, as well as the electrical, magnetic and mechanical properties of the desired electric machine. 13 | 14 | After the electric machine design is completed, the interface for the efficiency diagram generation appears. Here, you can select the different loss types to be considered in the diagram generation, as well as adjust the control and boundary conditions of the efficiency diagram. The start-button initiates the generation of the efficiency diagram, which takes about 7 seconds. When the efficiency diagram is displayed, the different loss type diagrams can be saved to the result-file. This concludes the electric machine design. 15 | 16 | ## Input Parameters 17 | The primary parameters, that need to be established are: 18 | - Nominal power 19 | - Rotational velocity 20 | - Nominal voltage level 21 | - Number of pole pairs 22 | - Power factor 23 | - Number of phases 24 | 25 | Then, specific options need to be inserted, such as: 26 | - Conductor material 27 | - Connection of winding 28 | - Type of cooling 29 | - Magnet pattern 30 | 31 | The aporiximated values do not need to be changed, since they represent values from literature and are mostly unknown specifically for a certain application. 32 | 33 | In the section for the options, the type of slot calculation is chosen and the slot animation can be selected. 34 | 35 | ## Output Parameters 36 | 37 | The output of the tool is mainly an Excel-file with all calculated machine parameters and the generated efficiency diagrams. 38 | 39 | ## Necessary Software 40 | 41 | MATLAB® 2017 and above. 42 | 43 | ## Validation 44 | The tool was validated using know machine parameters of the BMW i3, Nissan Leaf and VW e-Golf. 45 | 46 | ## Publication 47 | https://ieeexplore-ieee-org.eaccess.ub.tum.de/document/8813601 48 | DOI: 10.1109/EVER.2019.8813601 49 | 50 | Contact person: [Svenja Kalt](mailto:svenja.kalt@ftm.mw.tum.de) 51 | -------------------------------------------------------------------------------- /README_DesignTool.md: -------------------------------------------------------------------------------- 1 | # Electric_Machine_Design 2 | This Tool enables a holistic electric machine design and efficiency diagram generation using few input parameters. 3 | 4 | ## How-To 5 | The tool is made up of 2 main Meta-Models: 6 | - Electric Machine Design 7 | - Efficiency Diagram Generation 8 | 9 | In order to start the overall simulation, you have to run the MATLAB editor in the file Main.m. 10 | This starts the GUI-Interface, where you can insert the main input parameters of the desired electric machine. 11 | 12 | With the start-button the first Meta-Model for the electric machine design is inititated. This step takes about 3 seconds and calculates the main dimensions, boundary conditions of the active parts, the rotor and stator design, as well as the electrical, magnetic and mechanical properties of the desired electric machine. 13 | 14 | After the electric machine design is completed, the interface for the efficiency diagram generation appears. Here, you can select the different loss types to be considered in the diagram generation, as well as adjust the control and boundary conditions of the efficiency diagram. The start-button initiates the generation of the efficiency diagram, which takes about 7 seconds. When the efficiency diagram is displayed, the different loss type diagrams can be saved to the result-file. This concludes the electric machine design. 15 | 16 | ## Input Parameters 17 | The primary parameters, that need to be established are: 18 | - Nominal power 19 | - Rotational velocity 20 | - Nominal voltage level 21 | - Number of pole pairs 22 | - Power factor 23 | - Number of phases 24 | 25 | Then, specific options need to be inserted, such as: 26 | - Conductor material 27 | - Connection of winding 28 | - Type of cooling 29 | - Magnet pattern 30 | 31 | The aporiximated values do not need to be changed, since they represent values from literature and are mostly unknown specifically for a certain application. 32 | 33 | In the section for the options, the type of slot calculation is chosen and the slot animation can be selected. 34 | 35 | ## Output Parameters 36 | 37 | The output of the tool is mainly an Excel-file with all calculated machine parameters and the generated efficiency diagrams. 38 | 39 | ## Necessary Software 40 | 41 | MATLAB® 2017 and above. 42 | 43 | ## Validation 44 | The tool was validated using know machine parameters of the BMW i3, Nissan Leaf and VW e-Golf. 45 | 46 | ## Publication 47 | https://ieeexplore-ieee-org.eaccess.ub.tum.de/document/8813601 48 | DOI: 10.1109/EVER.2019.8813601 49 | 50 | Contact person: [Svenja Kalt](mailto:svenja.kalt@ftm.mw.tum.de) 51 | --------------------------------------------------------------------------------