You are on page 1of 310

Electric Machines Design Toolkit

Customized Solutions

Maxwell R16 (2015)


1 © 2012 ANSYS, Inc. January 12, 2015
Outline

Design Toolkits of Electric Machines


 Torque-Speed Curve
 Efficiency Map

User Defined Outputs of Electric Machines


 Average & RMS Solutions
 Transient D-Q Solutions
 Solutions for Special Machines
 Single Phase Machines
 Currents of Cage Rotor Induction Machines

2 © 2012 ANSYS, Inc. January 12, 2015


Disclaimer

• Copyright (c) 2015 by ANSYS Inc. All rights reserved.


• These source files may be used and distributed without restriction provided that
this copyright statement is not removed from the file and that any derivative
work contains this copyright notice.
• Warranty: ANSYS Incorporation makes no warranty of any kind with regard to
the use of this Software, either expressed or implied, including, but not limited
to the fitness for a particular purpose.

3 © 2012 ANSYS, Inc. January 12, 2015


Purpose of Customized Solutions

 The ANSYS Technical Team created these customized scripts


by using the standard capabilities available in Maxwell R15
2014.0 that our customers can likewise utilize. Customers are
free to modify and extend these scripts based on their
applications and needs.

 The purpose of creating these customized tools is to assist our


customers in accomplishing efficient and accurate results. Also,
to create a real, practical example demonstrating the
advantages of Maxwell scripting and customization capabilities

Please contact your ANSYS local support channel for questions


about the scripts and solutions of these customized tools
4 © 2012 ANSYS, Inc. January 12, 2015
Advantages of Python
• Dynamic language. This means it does not require compilation or array
definitions. It uses a runtime interpreter
• True programming language as compared to packages such as Matlab/MathCad
which are limited in terms of support to different OS systems and environments.
• Flexible, powerful, and easy to learn.
• Strong numerical and plotting packages that made Python the language of the
engineer. These include for example NumPy, SciPy, Matlibplot, ECePy, mpi4py
etc.
• Totally free and portable. Python is an open source and can be used on just
about any machine without licensing issues. This is a big advantage.
• Wrapping other libraries in C, C++, Fortran is fairly straightforward using SWIG,
Cython, f2py, etc.
• Clean code. Indentation makes Python most elegant.
• Miscellaneous GUI packages such as wxPython, TkInter, GTK, PyQt, IronPython,
etc.
5 © 2012 ANSYS, Inc. January 12, 2015
New in R16 (2015): Major Enhancements
& improvements in the toolkit
1. Induction machines are added, including torque speed curves, efficiency maps and other
performance curves and maps.
2. Speed effect in PM machines. The eddy effect and core loss effect can now affect the
calculation of operating points. It used to be post-processing only in previous release.
3. Only a single parametric sweep is needed, so this speeds up the generation of efficiency
maps significantly.
4. Several control strategies are added in addition to MTPA. For example, loss minimization
strategy, power factor maximization etc.
5. Different voltage control types are added including Space Vector PWM.
6. Large-Scale DSO can be used where a batch solve can be applied.
7. Extracting results for ECE and OPAL-RT use.
8. Custom Core Loss can be used to calculate core loss.
9. Including the effect of skew on torque ripples.
10. Use ‘Clean Stop’ for the parametric sweep and then re-run.

6 © 2012 ANSYS, Inc. January 12, 2015


Fixes of Reported Defects from R15-2014

1. Winding loss calculated by suing AC resistance is wrong in some scenarios.


2. Repeatability of torque speed curve and efficiency map is not perfect using the
Update option.

7 © 2012 ANSYS, Inc. January 12, 2015


Content
Slides 9-12: Quick Guide
Slides 13-17: Electric Machines Design Toolkit – Overview
Slides 18-56: Electric Machines Design Toolkit - Step-by-Step Description
Slides 57-80: Technical Notes: Characterization of the Performance and Efficiency Mapping PM Machines
Slides 81-94: Technical Notes: Characterization of the Performance and Efficiency Mapping Induction Machines
Slides 95-110: Technical Notes: Custom Core Loss Models
Slides 111-125: Technical Notes: UDOs Quantities - Description and Method of Calculation
Slides 126-137: Technical Notes: D-Q Solution - Calculation Method
Slides 138-141: Technical Notes: Voltage Control
Slides 142-155: Efficiency Map Displayer
Slides 156-216: PM Toolkit Examples
Slides 217-249: IM Toolkit Examples
Slides 250-254: User Defined Outputs (UDO) - Overview
Slides 255-266: User Defined Outputs of Electric Machines
Slides 267-274: Properties of the UDO Scripts of Electric Machines
Slides 275-284: Usage of UDOs of Electric Machines: Step-by-Step Description
Slides 285-307: UDO Examples
Slides 308-309: References

8 © 2012 ANSYS, Inc. January 12, 2015


Quick Guide: Electric Machines Design
Toolkit

9 © 2012 ANSYS, Inc. January 12, 2015


Quick Guide

User Defined Outputs Electric Machine Toolkits


Name X Y XY Plot 2 Maxwell2DDesign1_ACVnorm
m1 120.00
8.2000 97.6263 Curve Info
m2 68.2000 47.1699 Current(PhaseA)
Setup1 : Transient

m1
100.00

80.00
T=1/f 100.00
Torque vs Gamma Design_BH_right_Current_Gamma_Sweep1

60.00
Current(PhaseA) [A]

m2
87.50
40.00

20.00
67.50
0.00

Y1 [NewtonMeter]
-20.00
Data Table 1 47.50 PostProcessing
-40.00
1
-60.00
0.00 20.00 40.00 60.00
Time [ms]
80.00 100.00 Speed_rpm
120.00
InputPower [kW]
[rpm]
140.00 1000.000000
27.026186
𝛾 𝑖
F
27.50

OutputPower [kW] 22.435100


Torque [NewtonMeter] 214.239426 7.50
Speed [rpm] 1000.000000
PowerFactor 0.584396
XY Plot 5 Ld_Lq_7_5deg_Emad -12.50
8.00 SupplyCurrent [A] 141.417974 0.00 12.50 25.00 37.50 50.00 62.50 75.00 87.50
Curve Info
Gamma_TSC [deg]
L(d-axis) [V]
PhaseVoltage 109.005576
MachineSolutions1
gamma='180deg'
7.00 CoreLoss [W]
L(d-axis)
MachineSolutions1
113.115481
gamma='0deg'
SolidLoss [fW] 0.000000
L(q-axis)
MachineSolutions1
6.00 StrandedLossR
gamma='180deg' [kW] 2.400000

Y1 [mH]

L(q-axis)
MechanicalLoss
gamma='0deg' [W]
MachineSolutions1 99.999532
TotalLoss [kW] 2.613115 I
5.00
Efficiency 89.567660
PowerBalance 8.897381
4.00
V(d-axis) [V] -137.705223
V(q-axis) [V] 37.234678
3.00
-150.00 -100.00 -50.00 0.00 50.00 I(d-axis) [A]
100.00 150.00 -68.404310
Iq [A]
I(q-axis) [A] 187.938422
L(d-axis) [mH] 1.600205
L(q-axis) [mH] 1.982361
FluxLinkage(d-axis) [Wb] 0.068288
FluxLinkage(q-axis) [Wb] 0.331973

10 © 2012 ANSYS, Inc. January 12, 2015


Quick Guide

User Defined Outputs


• If not already exist, create a folder UserDefinedOutputs under userlib or
Personallib
• Place the directory Electric Machines Solutions – R16 into the
UserDefinedOutputs directory under syslib, userlib or Personallib.
• Create User Defined Solution
• Assign transient quantity as a probe
• Specify properties, if needed
• Create User Defined Report

11 © 2012 ANSYS, Inc. January 12, 2015


Quick Guide

Toolkit

• If not already exist, create a folder Toolkits under syslib or userlib or Personallib
• If not already exist, create another folder Maxwell2D (and/or Maxwell3D) under
Toolkits
• Place the directory Electric Machines Design Toolkit – R16 into the Maxwell2D
(and/or Maxwell3D) directory.
• From Maxwell2D/Maxwell3D > Toolkit > Electric Machines Design Toolkit
• Select an item
 Efficiency Map Displayer
 Electric Machines Design Toolkit

12 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Design Toolkit -
Overview

13 © 2012 ANSYS, Inc. January 12, 2015


Overview Electric Machines Toolkit

Overview: ANSYS Toolkit


• ANSYS Toolkit is supported in Windows and Linux
• Toolkit allows to build GUI through IronPython Scripting
• GUI can be created through the Ansys UI Toolkit package or .NET Windows
Forms. Documentation for Ansys UI Toolkit is available through ANSYS
channels. Electric machines Design Toolkit is scripted using the Ansys UI
Toolkit which is compatible with Windows and Linux
• The Toolkit functions similarly as the Run Script option except that Toolkit
keeps Menu items

14 © 2012 ANSYS, Inc. January 12, 2015


Overview Electric Machines Toolkit

Electric Machines Design Toolkit

Supports all types of (permanent-magnet) synchronous machines - motors


and generators

15 © 2012 ANSYS, Inc. January 12, 2015


Overview Electric Machines Toolkit

Installation: Creation of UDO Directory

• If not already exist, create a folder UserDefinedOutputs under userlib or


Personallib
• Place the directory Electric Machines Solutions – R16 into the
UserDefinedOutputs directory of UserDefinedOutputs. Your directory should
look like this:
C:\Program Files\AnsysEM\AnsysEM16.0\Win64\Maxwell\syslib\UserDefinedOutputs\Electric Machines Solutions – R16

or

C:\Users\edlala\Documents\Ansoft\PersonalLib\UserDefinedOutputs\Electric Machines Solutions – R16

Note: Personallib ensures read/write


permissions

Note: The UDOs and Toolkits are supported


for Maxwell R15 (2014) and Maxwell R16
(2015)
16 © 2012 ANSYS, Inc. January 12, 2015
Overview Electric Machines Toolkit

Installation: Creation of Toolkit Directory


• If not already exist, create a folder Toolkits under syslib or userlib or Personallib
• If not already exist, create another folder Maxwell2D (and/or Maxwell3D) under Toolkits
• Place the directory Electric Machines Design Toolkit – R16 into the Maxwell2D (and/or
Maxwell3D). Your directory should look like this:

C:\Program Files\AnsysEM\AnsysEM16.0\Win64\Maxwell\syslib\Toolkits\Maxwell2D\Electric Machines Design Toolkit – R16

or

C:\Users\edlala\Documents\Ansoft\PersonalLib\Toolkits\Maxwell2D\Electric Machines Design Toolkit – R16

Note: The UDOs and Toolkits are supported for


17 © 2012 ANSYS, Inc. January 12, 2015 Maxwell R15 (2014) and Maxwell R16 (2015)
Electric Machines Design Toolkit:
Step-by-Step Description

18 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Usage
• From Maxwell2D/Maxwell3D > Toolkit > Electric Machines Design Toolkit
• Select Update Menu once you create a Toolkit directory
• The UDO Average & RMS Solutions are required by the scripts of the Electric
Machines Design Toolkit
• Menu items
 Electric Machines Design Toolkit
 Efficiency Map Displayer

19 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Usage
• From Maxwell2D/Maxwell3D > Toolkit > Electric Machines Design Toolkit
• Select Update Menu once you create a Toolkit directory
• The UDO Average & RMS Solutions are required by the scripts of the Electric
Machines Design Toolkit
• Menu items
 Electric Machines Design Toolkit
 Efficiency Map Displayer

20 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Electric Machines Design Toolkit


1. Toolkit starts with a Transient Design of an
electric machine with a complete, validated
Analysis setup (Maxwell2D or Maxwell3D) (for
example, a machine design created by RMxprt).
Excitation are current source for PM machines
and external source for IM machines
2. Toolkit will not modify mesh, nonlinear residual
in the original design so user must ensure that
they are set correctly. The same applies to
quantities such as core loss, eddy effects, etc
3. Toolkit requests Optimetrics for creating
parametric analysis
4. Implementation is done for sinusoidal current
supply for PM machines and sinusoidal voltage
for IM machines
5. Toolkit uses custom optimization tools and
evolutionary optimizer to search for the optimal
operating points
6. Script is fully automated
21 © 2012 ANSYS, Inc. January 12, 2015
Electric Machines Toolkit Step by Step

User Input Data (1)


General Tab
1. Toolkit starts with an existing Transient Design
with an Analysis Setup complete
2. A UDO setup for Average and RMS Solution
must be created a priori
3. The first time the script is called, default
settings will be populated for all tabs.
4. The toolkit saves the User Input Data for each
project once Run is pressed
5. Default Settings may be reset by clicking on
the Default Settings button
6. The Help button can be used to open user
manuals for the Electric Machines Design
Toolkit

22 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (2)

1. Select the type of electric machine:


PM Synchronous Machine
 PM Synchronous machine
 Induction Machine
2. Select the control strategy:
 MTPA
 Total Loss Minimization
 Core Loss Minimization
 Solid Loss Minimization
 Torque Ripple Minimization
Induction Machine
 Power Factor Maximization
 Id Minimization (only for PM)
 Iq Minimization (only for PM)

Note: by default, the machine type is


automatically set based on the excitation.
Designs with End connection are assumed
Induction machines.
23 © 2012 ANSYS, Inc. January 12, 2015
Electric Machines Toolkit Step by Step

User Input Data (3)


General Tab
1. Enter the value of the maximum line RMS
current
2. Select the connection type:
 Wye-connection
 Delta-connection
3. Select the voltage control type:
 Line-Line RMS Voltage
 Sinusoidal PWM
 Third Harmonic PWM
 Space Vector PWM

24 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (4)


General Tab
4. Depending on the voltage control type, the
user needs to enter:
• Line-Line RMS voltage for Line-Line RMS Voltage
control type, or
• DC Voltage and Modulation Index for PWM
control types, and
• Note the user will need to enter the maximum
modulation index. The voltage control is used
to calculate the limiting RMS voltage.

25 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (5)


General Tab
1. User can generate curve for a motoring
mode, generating mode or both.
2. Before clicking Run, the user may have to
revisit the other Tabs

26 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (6)


Sweep & Map Tab
1. User can select the number of electric periods, number of
time steps per period, and the number of electric periods
used for averaging.

2. For PM machines, user can control the size of the


parametric sweep of the current, current angle and speed
by:
• Number of Electric Current Sweep Points
• Number of Angle Sweep Points
• Number of Speed Sweep Points

3. For PM machines, if motor mode or generator mode is


used, the number of current angle points will be used for a
90-deg sweep. If both modes are used the number of
current angle points will be used for 180-deg sweep.

Note the content of the Sweep & Map Tab


changes based on which machine type is
selected.

27 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (7)


Sweep & Map Tab

1. User can control the size of the parametric sweep of the


voltage, slip and frequency by:
• Number of Voltage Sweep Points
• Number of Slip Sweep Points
• Number of Frequency Sweep Points

2. For IM machines, the slip vary from 0 to 1 for motor mode


and 0 to -1 for generator mode and from -1 to 1 for both
modes.

28 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (8)


1. User can enter the number of speed points in the constant
torque region or the speed step.
2. If an integer number is entered, the script will use it as number of
speed points. If a number with an RPM unit is entered (e.g.
50rpm), the script will use it as a speed step.
3. Torque threshold factor and/or Maximum speed define the last
point in the field weakening region. Simulation in field weakening
will stop once one of these two criteria is met.

Torque threshold factor = Torque at Maximum Speed /Maximum Torque


29 © 2012 ANSYS, Inc. January 12, 2015 0  threshold  1
Electric Machines Toolkit Step by Step

User Input Data (9)


1. User can enter the number of torque points in Speed step used instead of number of points
the constant torque region or the torque step.
2. If an integer number is entered, the script will use
it as number of torque points. If a number with an
N.m unit is entered (e.g. 50nm), the script will use
it as a torque step.
3. Note that if a torque step is chosen, the maximum
torque will be reliant on the step size.

30 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (10)


Windings Tab
1. User selects the windings orientation of the
machine whether it is Counter-clockwise or
Clockwise rotation based on design
windings orientation
2. User can allow the script to automatically
find the alignment angle of the D-Q axis for
generic orientation of windings/magnets. If
the box is unchecked, the user needs to
adjust the alignment angle from the UDO
setup prior to clicking Create Curve
3. Ld, Lq computation can be automatically
done by the script and no need to align
rotor position for that (assuming checkbox
for Align D-Q axis by the script is active)

31 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (11)

1. Windings Tab has also an addition which Windings Tab


is the inclusion of the effect of AC
Resistance on the efficiency map.
2. For example, AC resistance can be
conveniently computed using the Eddy
Current Solver.
3. To include the effect of Temperature,
user must check the box and enter Tref
& Tmax. Tref is the temperature
corresponding to DC resistance entered
in the properties of the UDO. Tmax is
the temperature at the maximum
current/maximum load (torque)
4. To include the effect of AC Resistance,
user must check the box and open file
(browse) that contains AC resistance vs.
Frequency
32 © 2012 ANSYS, Inc. January 12, 2015
Electric Machines Toolkit Step by Step

User Input Data (12)

1. File format can be .txt, .tab or .data Windings Tab


containing two columns of data for
frequency [Hz] and resistance [ohms]
2. Script will interpolate linearly between
values and extrapolate if needed.

33 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data (13)


Simulation Tab
1. LSDSO options is useful to solve large scale
parametric sweeps.
2. The user needs to check the box for “Use LSDSO”
and click button “Create LSDSO Setup”.
3. The toolkit will prepare the LSDSO setup and the
user needs to submit a job for the created design
and parametric setup.
4. The job can be submitted as batch solve in
Windows or Linux. No merge CSV files is needed.
5. Once LSDSO results are ready, the toolkit will
populate, by Job ID name, the jobs directories
under the Maxwell results folder. The user then
can click Update to get the results.
6. Note that if the user keeps the option of aligning
the D-Q axis with the script, the toolkit will go
through this process first and then create the
LSDSO design.

34 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Miscellaneous (14)


Simulation Tab
1. Only Calculate Envelope of Torque Speed Curve: if the box
is checked, the optimization is done for the envelop of the
torque speed curve only. The toolkit will still simulate the
same parametric sweep regardless of this options.

2. Create ECE and OPAL-RT Data: This option is needed only if


the ECE Simplorer and OPAL-RT data is needed. In this
case, the current angle Gamma is swept for 360o so the
user must make sure enough number of Gamma intervals
are used.

3. Re-Read Transient Data and Re-Create Response Surface:


This option is needed if the user needs to re-read the
transient reports from the toolkit directory where the
transient files will be written the first time they are
created. Not often needed unless toolkit directory was lost.
This is of course different for LS-DSO.

4. Keep Transient Data in Toolkit Directory: the files of the


transient reports of the parametric sweep are by default
written and read by the toolkit. If the user needs to keep
the CSV files, this option allows that, and the CSV files will
be kept under the toolkit directories. For LS-DSO, the files
are saved anyway and not deleted by the toolkit.

35 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Skewing (15)


Advanced Tab
1. The script can automatically calculate the
effect of skewing.
2. The user needs to specify whether the skew
is single-sided staircase or double-sided
staircase and enter the skewing angle
between two adjacent segments in
mechanical degrees and the number of
segments and (check technical notes for
details)

36 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Optimization (16)


Advanced Tab
1. Optimization algorithm is used to find
the optimal current angle during the
search of the Torque Speed Curve.
2. Default values for “Population Size” and
“Maximum Number of Evaluations” are
adequately selected to obtain global
optimal but user can increase these
values for more accurate solutions or
decrease them for quicker optimization.

37 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Custom Core Loss (17)


Custom Loss Tab
1. The user can choose to calculate the
core loss from a custom loss code. This
is an option. If not used, the toolkit will
use the Maxwell core loss model.
2. There are three types of custom core
loss models:
 Time-domain core loss model
 Frequency-domain core loss model (with
constant coefficients)
 Frequency-domain core loss model (with
variable coefficients)

38 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Custom Core Loss (18)


Custom Loss Tab
 To activate, the custom core loss model:
1. Check the box of “Use Custom Core Loss”.
2. Select time-domain or frequency-domain model
3. Enter Symmetry Multiplier (it will be found
automatically)
4. Add the object(s) to the list and their
properties
 The user can enter the properties of the first
object (row) and then click the + button to
copy the properties of the first object to the
next object(s).
 The user also can delete object(s) by using the
– button

39 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Custom Core Loss (19)


Custom Loss Tab
 To activate variable coefficients Kh and Kc :
1. Check the box of “Use Custom Core Loss”.
2. Select Frequency-Domain Model
3. Enter Symmetry Multiplier
4. Browse for the power loss density file which
contains loss data in W/kg as a function of B
and f as shown below.
5. Specify/Add the object(s) to the list and their
properties using the arrow and + button
6. If user clicks "Browse" and uploads the loss file
before adding a new object with button +, then
all next + clicks will copy the file for the file for
all objects.

40 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Custom Core Loss (20)

 Once the user makes sure the user entry


options are compete, Run will launch the
simulation of the efficiency map, creating all
necessary design setups.
 The results will be written under a directory
created next to the Maxwell project file. This
part is more explained in the coming slides.

41 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

User Input Data – Additional

 There are a few additional options that can be


changed from within the script file itself:
• Correction factors of the core loss and solid loss
• Mechanical loss coefficient (see technical notes
for details)
• OPAL-RT parameters that define the of the final
data table formats

42 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Simulation
1. Once Run is pressed, the toolkit will create a Before Create Map (original design)
new Design from the original Design. The
new Design is for simulating the parametric
sweep.
2. Original design will remain intact.
After Create Map (Motor Mode)
3. It is possible to simulate another
setup/scenario from original design. Toolkit
will automatically create a new design. Also
the user can simulate new scenarios using
the Update button.

43 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

PM Simulation

1. Script will create three new local design variables in


the new design:
After Create Map (Both Modes)
• Speed_TSC
• Imax_TSC
• Gamma_TSC
2. Script will create the required excitations for the
simulation. (Note that if the original design is
voltage fed or external circuit fed, the user should
change it to current fed and specify UDO properties
before running simulation .)

44 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

IM Simulation

1. Script will create three new local design variables in


the new design:
After Create Curve (Motor Mode)
• Freq_TSC
• Vmax_TSC
• Slip_TSC
2. Script will create the required excitations for the
simulation. (Note that if the original design is
voltage fed, the user should change it to external or
current fed and specify UDO properties before
running simulation).
3. The IM excitation uses external circuit with voltage
source, which is automatically created with an AC
model to speed up the simulation.
4. User needs to change the excitation of the windings
to external before assigning the UDOs or running
the toolkit. The resistance and inductance entered
in the properties of the UDOs will be used in the
external circuit.

45 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Algorithm Stages

Use an Existing Transient Finish


Design (Create Report Plots)

Enter UDO & User Input Data Do post-processing

Press Run
Calculate optimal operating points
(create necessary designs)

Simulation of
Retrieve Data from Sweep
Parametric Sweep

46 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Reports

• Reports will be created at the final stage of the script


• Global Messages Icon will appear in the Massage Manager once the user
presses Create Map. The progress of the simulation will be printed in under
this icon

47 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Output Files

• Directory with ProjectName.tookit will


be created along the project file and
the results directory
• Directory will contain folders for the
designs of the efficiency map
• Each folder will contain a set of files

Note: Toolkit directory will not be updated


during Save As or Rename of the project
48 © 2012 ANSYS, Inc. January 12, 2015
Electric Machines Toolkit Step by Step

Toolkit Output Files


• File UserInputData.txt contains the UI input data entered by the user. File is needed for
Update Map
• File GammaCurrentSweep.txt contains the sweep data for the current, the current angle
and speed
• File Validation_Sweep_Map_motor.txt contains the sweep data of Efficiency map. If
needed, the user may run the parametric from the file using Optimterics Parametric
From File

• File SweepResultData.pickled contains internal toolkit information if the user needs to


Update Run while the option Re-Write and Read Transient Data is checked.

• File ResultData.pickled contains the processed results of the transient data that will be
required if the user needs to Update Run.

• File EfficiencyMap_motor.data contains the data of all the computed maps that can be
displayed by the Efficiency Map Displayer

• File SimResults_Map_motor.csv and SimResults_TSC_motor1.csv contains all toolkit


results tabulated in CSV file.

• The folder transient will contain the CSV files for the transient results if the option Keep
Transient Data in Toolkit Directory is checked.

• The folder curves contains the CSV files for the torque-gamma or torque-slip results.

49 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Toolkit Output Files


• If the option Create ECE and OPAL-RT Data was checked before clicking
Run. ECEData folder will be written which contains ECE data to be used in
conjunction with Simplorer ECE model for PM Synchronous Machines.

• File OpalRT_Matlab_Model.mat will be written if the option Create ECE


and OPAL-RT Data was checked before clicking Run.

• The OPAL-RT Matlab file is created through the Python toolkit capability.
No Matlab post-processing is needed.

• If the entry of the Number of Speed Sweep Points was selected to be 1,


only OPAL-RT data will be written since these data are static and it’s
better/faster to have Eddy Effect off. However, the ECE Data contain loss
results are speed dependent and better to have Eddy Effects. The
Number of Speed Sweep Points is needed to be 4 or greater to extract
ECE data.; in this case the OPAL-RT data will be extracted at 1rpm.

• If Custom Core Loss is used, a folder named coreloss will be created


which contains the core loss results.

50 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

The toolkit Simulation Data in


SimResults.txt File
All data in the CSV files are L-L RMS or average steady-state.

51 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

The Update Option


• The Update button is very useful for creating new User needs to set the design of the
performance and efficiency map data without re- efficiency map as the active design and
running the simulation. click Update
• User can update the efficiency map on the existing
simulated design
• File ResultData.pickled and the Design with the
simulated results are required. If Project or Design is
renamed, the .toolkit directory must accordingly be
renamed manually by the user. If file
ResultData.pickled did not exist or got deleted, the
toolkit will automatically start writing and reading
reports from the transient runs.
• The user can update the properties of the UDO setup
as well as include or update the AC Resistance file.
• New files, e.g. EfficiencyMap_motor2.data, will be
created saved under toolkit directory.

52 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

The Update Option with Clean Stop

• The Update option can be used if the user wants to stop the simulation and re-run at
another time. The steps to do that:
1. Click Clean Stop and let Maxwell complete the current simulation
2. Close the project (when needed)
3. Open the Project and Run parametric analysis setup ParametricSetup1 in the
design created by the toolkit
4. Open the Toolkit and click Update

53 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

The Update Option

• List of user input that can be updated during the Update click:
1. UDO setup: properties such Rs and Le, Ref speed, mech loss etc.
2. Current: it can be decreased from its original setting but not increased.
3. Control strategy: MTPA, loss minimization etc.
4. Voltage control type: Sinusoidal PWM, Space Vector etc.
5. DC voltage and modulation index.
6. Connection type: Wye or Delta. In this case, the option Re-write and read transient data must be
checked.
7. Map Characteristics: Number of Speed Points, Number of Torque Points, Torque Threshold Factor,
Maximum Speed. Note: Maximum speed can be updated to a lower value but not a higher value from
the original run.
8. Include the effect of AC resistance
9. Include the effect of temperature on resistance.
10. Modify the optimization parameters: population size and maximum number of evaluations.
11. If LS-DSO was used, a different job ID can be used during an update.
12. Only Calculate Envelope of Torque speed Curve.
13. Re-write and read transient data.
14. Keep transient data in toolkit directory. In this case, the option Re-write and read transient data must
be checked.

54 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

The Update Option

• List of user input that can NOT be updated during the Update:
1. Motor mode, unless both modes were selected during the Run and the user wants to select a single mode for
the Update.
2. The Design of Experiments Characteristics related to the parametric sweep such as number of time steps, the
number of current points, angle points and speed points.
3. Winding orientation.
4. Auto alignment of the rotor and D-Q model.
5. Include the effect of skewing.
6. Custom Core Loss Calculations.
7. For IM, the values of DC resistance and end-winding inductance.

55 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Update

Select the Efficiency Map Design


as the active design

Open Electric Machines Design Toolkit

Make desired changes to user input data

Click Update Run

56 © 2012 ANSYS, Inc. January 12, 2015


Technical Notes: PM Synchronous Machines
Torque Speed Curve & Efficiency Map

58 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes - Torque Speed Curve &


Efficiency Maps

Torque
Voltage
Power

Windings
loss dominate

Constant
torque Best
efficiency
Field
weakening Core loss
dominate

Base speed Speed

59 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Parametric Design


• Parametric sweep is required because we
need to search for the current and current The current variable Imax_TSC is swept with a
angle linear step based on the maximum RMS
• The parametric sweep varies the current current values and number of points.
Imax_TSC, current angle Gamma_TSC, and
Speed_TSC For motoring mode, the angle variable
Gamma_TSC is swept with a linear step from
0 to 90 deg based on the number of points.

The speed variable Speed_TSC is swept from


1rpm to Maximum speed

Pole pairs = Poles/2

Ia = Imax_TSC * sin(4.0*Position+Gamma_TSC + 240deg)

Ib = Imax_TSC * sin(4.0*Position+Gamma_TSC-2*pi/3 + 240deg)

Ic = max_TSC * sin(4.0*Position+Gamma_TSC+2*pi/3 + 240deg)

60 © 2012 ANSYS, Inc. January 12, 2015


Alignment angle
Toolkit – Tech Notes

Technical Notes – Effect of Stator Resistance


• Since the voltage is important for computing the base speed, the user is
recommended to add the effect of the stator resistance and end-winding
inductance (Le) in the UDO setup. User must ensure to enter correct values.

• If the original design is a voltage fed, the user can include the effect of the stator
resistance and end-winding inductance after the simulation is complete. This
can be done by editing the UDO setup and then Update Run.

di (t ) d (t )
v(t )  Rsi (t )  Le 
dt dt

61 © 2012 ANSYS, Inc. January 12, 2015


Creation of DOEs by the Toolkit

 A parametric table of DOEs is created where 𝑖, 𝛾, 𝑛, are varied

Click to edit Master text styles

62 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Parametric Sweep (2/3)


• The user may allow the script to find the right alignment angle automatically. In this case, the script will run
one additional sweep of 19 variations.

• The alignment angle is needed to allow Gamma to vary from 0 to 90deg in motoring mode and from 90 to
180 deg in generating mode, and from 0 to 180 if both modes is selected.

• After the parametric sweep of current 𝑖, angle 𝛾, and speed 𝑛, is done, the toolkit will write and read data.

• The data for all needed quantities such voltage, torque, loss, power factor, Id, Iq etc will be extracted and
tabulated in a lookup table to be sued for surface response method. A combined spline & trilinear 3D
interpolation algorithm are implemented in the code.

𝛾 𝑖

63 © 2012 ANSYS, Inc. January 12, 2015


What is Torque Speed Curve?

 The torque speed curve more commonly refers to the torque speed
capability curve created by the control of voltage and frequency. It is
also called the envelope or the maximum torque envelope

Click to edit Master text styles

nb
64 © 2012 ANSYS, Inc. January 12, 2015
Torque Speed Capability Curve

 The torque speed capability curve is created by controlling voltage and


frequency in order to get maximum torque
 > However, in a current-controlled machine, the current 𝑖 and angle 𝛾
(or 𝐼𝑑 and 𝐼𝑞 ) are controlled. At each operating speed point 𝑛 on the
capability curve, there is a unique combination of 𝐼𝑑 and 𝐼𝑞 that
produces maximum torque and meets current and voltage limits.

𝑣
Note: = 𝑐 strategy is not
𝑓
satisfactory especially at low speeds
𝑇(𝑖, 𝛾, 𝑛) where the effect of DC resistance is
important and at higher speeds if the
Click to edit Master text styles
eddy-current and core loss effects
are strong!

65 © 2012 ANSYS, Inc. January 12, 2015


Optimization Algorithm

 An optimization algorithm is used to find the optimal variables 𝑖 & 𝛾


that give maximum torque while meeting voltage limit criterion for
every operating speed point on the capability curve.

Click to edit Master text styles

66 © 2012 ANSYS, Inc. January 12, 2015


Response Surface Method

 A response surface function with 3D spline interpolation algorithm is


applied.
 This method allows to use the whole space in the optimization stage.

Voltage surfaces at different speeds Torque surfaces

𝛾 𝛾 𝑖 styles
Click to edit Master text
𝑖

Key! The response surface method is a function which can be evaluated quickly
for an arbitrary given input of current 𝑖, angle 𝛾, and speed 𝑛.
67 © 2012 ANSYS, Inc. January 12, 2015
The Map

 Once the capability envelope is created, a control strategy is applied to get


optimal operating points inside the envelope.

 Inside the envelope, for a given operating torque-speed point, there is an


infinite number of 𝑖 & 𝛾combinations to choose from. Therefore, a control
strategy is needed to add a constrain on the operating point.

Click to edit Master text styles

68 © 2012 ANSYS, Inc. January 12, 2015


Control Strategies

There are several control strategies that can be applied to an PMSM


motor. The implemented control strategies in the toolkit are the
following:

1. MTPA
2. Total Loss minimization
3. Power factor maximization
4. Torque Ripple minimization
5. Core Loss minimization
6. Solid Loss minimization
7. Id minimization
8. Iq minimization

Click to edit Master text styles


Note: other control strategies can be added in the toolkit in a convenient way.

69 © 2012 ANSYS, Inc. January 12, 2015


MTPA
• MTPA Algorithm searches for the current angle that gives maximum torque.
This minimizes current and maximizes efficiency.
• Under the MTPA control, the PM machine is usually able to accelerate with
maximum constant torque till the speed reaches a value at which the terminal
voltage reaches the limit value.

Example of MTPA trajectory

Click to edit Master text styles

70 © 2012 ANSYS, Inc. January 12, 2015


Total Loss Minimization Strategy
• The optimization procedure is done to minimize the total loss for every
operating point inside the envelope. The total loss represents all
electromagnetic losses such winding loss, core loss and magnet solid loss, and
if included mechanical loss.
• The response surface method is key here to search for the optimal 𝑖 & 𝛾 that
minimize the total loss while the voltage criterion is met.

Click to edit Master text styles

𝛾 𝑖

Total loss surfaces at different speeds


71 © 2012 ANSYS, Inc. January 12, 2015
Other Control Strategy
• Similar to the optimization procedure used for loss minimization, other control
strategies can be applied to minimize or maximize the optimized quantity.

Power factor surfaces at different speeds Torque ripple surfaces at different speeds

𝛾 𝑖
𝑖 𝛾

Id surfaces at different speeds Core loss surfaces at different speeds

Click to edit Master text styles

𝛾 𝑖
𝑖 𝛾
72 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Tech Notes

Technical Notes – Optimization Problem


To ensure global minima, evolutionary computations algorithm is implemented
in the script

Initialize population

Create offspring

Evaluate fitness for F


each candidate
no

Apply selection Terminate?

yes
𝑖
𝛾
73 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Tech Notes

Technical Notes – Optimization Problem


• Currently, Multiobjective Optimization Nondominated Sorting Genetic
Algorithm (NSGA-II) with (Pareto) dominate solution is used for MTPA and
flux-weakening region
• Genetic Algorithms is set as the default method for optimization for search
of Maximum or Minimum torque .

There are 9 methods that are implemented in the script:


1. Genetic Algorithm
2. Evolution Strategy
3. Differential Evolution Algorithm
4. Simulated Annealing
5. Estimation of Distribution Algorithm Custom
6. Evolutionary Computation
7. Particle Swarm Optimization
8. Multiobjective Optimization Nondominated Sorting Genetic Algorithm (NSGA-
II)
9. Multiobjective Optimization Pareto Archived Evolution Strategy (PAES)

74 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Skewing


• Skewing can have an important effect on the torque and back emf voltage.

• Script calculates the effect of skewing on the instantaneous torque and RMS voltage.

• Script assumes that there is positive and negative skewing and adds Gamma angles
accordingly.

Single-sided staircase

Skewing angle
Segment

Double-sided staircase

Skewing angle

Segment
75 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Tech Notes

Technical Notes – Skewing


• Skewing can have an important effect on the torque and back emf voltage.

• Script calculates the effect of skewing on the instantaneous torque and RMS voltage.

• Script assumes that there is positive and negative skewing and adds Gamma angles
accordingly.

1 1
Unskewed Center
Skewed 0.8 Positive
0.8 Negative
0.6

0.4
0.6

Torque
Torque

0.2
0.4 0

-0.2
0.2
-0.4

0 -0.6
0 10 20 30 40 50 60 70 80 90 -20 0 20 40 60 80 100 120
Gamma Gamma

76 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Skewing


Motor Example: = 3.75 deg

Single-sided staircase, Skew angle (mech) = 3.75 deg, Poles = 8, Segments = 4

Skew angle (electrical) = 3.75*8/2 = 15 deg


Note: For skew, the Gamma interval will be calculated based on the skew angle and the number of Gamma points. In this example
the skew angle is 15 deg but 7.5 deg was used for a higher accuracy based on the number of Gamma points.
77 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Tech Notes

Technical Notes – Skewing


For the skew parametric sweep, the Gamma interval will be calculated based on
both the skew angle and the number of Gamma points.

Gamma Angles [electrical deg ] = [-22.5, -7.5, 7.5, 22.5, 37.5, 52.5, 67.5, 82.5, 97.5, 112.5]
Skew Window [electrical deg ] = [-22.5, -7.5, 7.5, 22.5]

For accuracy, the Gamma interval is decreased from 15 deg to 7.5 deg based on the number of Gamma points

Gamma Angles [electrical deg ] = [-22.5, -15.0, -7.5, 0.0, 7.5, 15.0, 22.5, 30.0, 37.5, 45.0, 52.5, 60.0, 67.5, 75.0,
82.5, 90.0, 97.5, 105.0, 112.5]

Skew Window [electrical deg ] = [-22.5, -15.0, -7.5, 0.0, 7.5, 15.0, 22.5]

78 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Skewing


The effect of skew is clear on the torque and torque ripple. The torque is reduced by a factor of 0.93 in
this case.

No-skew
Skew

Skew No-skew

79 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Skewing


The skew has a clear effect on the torque speed curve. The maximum torque is reduced by a factor of
0.93 in this example. The base speed is increased since the back EMF (voltage) needed to create the same
flux is reduced. Therefore, the motor has better performance in the flux weakening region

80 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Skewing


The effect of skew is clear on the torque and torque ripple. The torque is reduced by a factor of 0.93 in
this case.

Skew No-skew

81 © 2012 ANSYS, Inc. January 12, 2015


Technical Notes: Characterization of the Performance and
Efficiency Mapping of Induction Machines

82 © 2012 ANSYS, Inc. January 12, 2015


The Induction Machine

Click to edit Master text styles

83 © 2012 ANSYS, Inc. January 12, 2015


Wikipedia
Induction Machine Toolkit

Click to edit Master text styles

84 © 2012 ANSYS, Inc. January 12, 2015


External Voltage Excitation

 In induction machines, sinusoidal voltage excitation is used. In the toolkit, the


sinusoidal voltage is realized via an external circuit to take advantage of the AC
model used to reduce the transient.

0.000229044 0.05ohm LPhaseA


LA RA
LabelID=IVoltmeter61

0.000229044 0.05ohm LPhaseB


LB RB
LabelID=IVoltmeter62

+ + + 0.000229044 0.05ohm LPhaseC


310V 310V 310V
LC RC
LabelID=V60 LabelID=V68 LabelID=V69

0
Model

 User needs to change the excitation of the windings to external Click to edit Master text styles
before assigning the UDOs or running the toolkit.
 The resistance and inductance entered in the properties of the
UDOs will be used in the external circuit.

85 © 2012 ANSYS, Inc. January 12, 2015


What is Torque Speed Curve?

 In induction motors, the torque speed curve may refer to the torque
speed curve at a constant voltage and variable speed/load. This curve
is also called the torque slip/load curve

Click to edit Master text styles

86 © 2012 ANSYS, Inc. January 12, 2015


How to Create the Torque Speed/Slip Curve?

 At fixed voltage and fixed frequency, varying the load creates the torque slip
curve. Theoretically, varying the load is the same as varying the slip or
varying the rotor speed. Transient solution is performed at different speeds
and steady state values are plotted.

60𝑓
𝑛𝑠 =
𝑝

𝑠 = (𝑛𝑠 − 𝑛)/𝑛𝑠

Disadvantage:
No control
Click & thustextlow
to edit Master efficiency
styles

87 © 2012 ANSYS, Inc. January 12, 2015


Change of Current with Slip

Remember the current limit!

Click to edit Master text styles

88 © 2012 ANSYS, Inc. January 12, 2015


What is Torque Speed Curve?

 The torque speed curve more commonly refers to the torque speed
capability curve created by varying voltage and frequency. It is also
called the envelope or the maximum torque envelope

Click to edit Master text styles

89 © 2012 ANSYS, Inc. January 12, 2015


How to Create Torque Speed Capability
Curve?
 The torque speed capability curve is created by controlling voltage and
frequency in order to get maximum torque
 At each operating point on the capability curve, there is a unique
combination of voltage, frequency and slip that produces maximum
torque and meets current and voltage limits

𝑣
Note: = 𝑐 strategy is not
𝑓
satisfactory especially at low speed
𝑇(𝑣, 𝑓, 𝑠) where the effect of DC resistance is
important
Click to edit Master text styles

90 © 2012 ANSYS, Inc. January 12, 2015


Create DOEs

 A parametric table of DOEs is created where 𝑣, 𝑓, 𝑠 are varied


 Smart DOEs algorithm is used to create a minimal number of DOEs for
induction motor where more slip points are used close to 0 slip.

Click to edit Master text styles

91 © 2012 ANSYS, Inc. January 12, 2015


Optimization Algorithm

 An optimization algorithm is used to find the optimal variables 𝑣, 𝑓, 𝑠


that give maximum torque while meeting voltage and current criteria
for every operating speed

Click to edit Master text styles

92 © 2012 ANSYS, Inc. January 12, 2015


Response Surface Method

 A response surface function with 3D powerful spline interpolation


algorithm is applied.
 It allows to use the whole space in the optimization stage.

Key!

Click to edit Master text styles

93 © 2012 ANSYS, Inc. January 12, 2015


The Efficiency Map

 Once the capability envelope is created, a control strategy is applied to


get optimal operating points inside the envelope.
 Inside the envelope, for a given operating torque-speed point, there is
an infinite number of 𝑣, 𝑓, 𝑠 combinations to choose from. Therefore, a
control strategy is needed to add a constrain.

Click to edit Master text styles

94 © 2012 ANSYS, Inc. January 12, 2015


Control Strategies

 There are several control strategies applied to an induction motor. The


same response surface is used during the optimization stage of the
operating points

Implemented control strategies:

1. MTPA
2. Total Loss minimization
3. Power factor maximization
4. Torque Ripple minimization
5. Core Loss minimization
6. Solid Loss minimization Click to edit Master text styles

95 © 2012 ANSYS, Inc. January 12, 2015


Technical Notes: Custom Core Loss Models

Example 1: Create Efficiency Map


Example 2: Update Curve
Example 3: Create Efficiency Map for motor and generator modes

96 © 2012 ANSYS, Inc. January 12, 2015


Custom User Defined Core Loss

Click to edit Master text styles

97 © 2012 ANSYS, Inc. January 12, 2015


Time-Domain Core Loss Model (Maxwell’s
Model)
 To validate the framework, the Maxwell core loss model will be
implemented via the control program.
 Details of the model are found in the article below.

Click to edit Master text styles

98 © 2012 ANSYS, Inc. January 12, 2015


Time Domain Core Loss Model (Maxwell’s
Model)
n
u  x , y    ai f i  x , y  𝑩 = 𝛻 ×A
bfield.ctl i 1

𝑑𝑎 𝑑𝑎
𝐵𝑥 = 𝐵𝑦 =
𝑑𝑦 𝑑𝑥
Shape Functions

Bx,By,Bz
dBx, dBy, dBz
Core Loss Function

p h , p c, p e Click to edit Master text styles

99 © 2012 ANSYS, Inc. January 12, 2015


User Defined Core Loss Function
// needed for the numerical integration
CINT = 2.0*DET*GAUW[NG-1][IG]*SYMMTRY_MULTIPLIER;

// start core loss computation

Hmx = Kh[IndexID]*1/pi*UEX[IG][0][K];
Hmy = Kh[IndexID]*1/pi*UEX[IG][1][K];
Hmz = Kh[IndexID]*1/pi*UEX[IG][2][K];

if (UEX[IG][0][K]==0)
HX = sqrt(pow(Hmx,2));
else
HX = sqrt(std::abs(pow(Hmx,2) - pow(Hmx*BX/UEX[IG][0][K],2)));
if (UEX[IG][1][K]==0)
HY = sqrt(pow(Hmy,2));
else
HY = sqrt(std::abs(pow(Hmy,2)- pow(Hmy*BY/UEX[IG][1][K],2)));
if (UEX[IG][2][K]==0)
HZ = sqrt(pow(Hmz,2));
else
HZ = sqrt(std::abs(pow(Hmz,2)- pow(Hmz*BZ/UEX[IG][2][K],2)));

// hysteresis loss
CHYS = CINT*pow((pow(std::abs(HX*DBX/dt),2/Beta[IndexID])+pow(std::abs(HY*DBY/dt),2/Beta[IndexID]) + pow(std::abs(HZ*DBZ/dt),2/Beta[IndexID])), Beta[IndexID]/2);

// clasical eddy current loss


Click to edit Master text styles
CEDDY = Kc[IndexID]*CINT/(2*pi*pi)*(pow((DBX/dt),2)+pow((DBY/dt),2)+pow((DBZ/dt),2));

// excess loss

CEXC = Ke[IndexID]/Ce*CINT*pow((pow(std::abs(DBX/dt),2)+pow(std::abs(DBY/dt),2)+pow(std::abs(DBZ/dt),2)), Alpha[IndexID]);

100 © 2012 ANSYS, Inc. January 12, 2015


Verification: Maxwell Model and User
Defined Model

Click to edit Master text styles

101 © 2012 ANSYS, Inc. January 12, 2015


Frequency Domain Core Loss Model

 
N
P   K h (nf ) Bn2  K c nfBn   K e nfBn 
2 1.5

n 1
Where n is harmonic number

Fourier analysis is performed efficiently on the time-domain FE


results in each element in the mesh

Verification: Using Parseval’s theorem the average eddy loss from the
time-domain must be equal to the eddy loss from the frequency
domain model

 
2
 
N T
Pc   K c nfBn  
1 2 dB
2    todtedit Master text styles
2
K
T 2 0  dt  Click
c
n 1

Note: the identification of the coefficients in the frequency domian is done


using the same algorithm for the time domain model
102 © 2012 ANSYS, Inc. January 12, 2015
Frequency Domain Core Loss Model

 
N
P   K h (nf ) Bn2  K c nfBn   K e nfBn 
2 1.5

n 1

Key Advantages:

 Compute the core loss as a function of frequency


 Compute and demonstrate which harmonics contribute to the loss
 Core loss coefficients can be variable with frequency and flux density
 Determine the right time-step size by the harmonic content

Note:

Click to edit Master text styles


 The frequency domain model requires periodic functions.

103 © 2012 ANSYS, Inc. January 12, 2015


New Model: Frequency Domain Core Loss
with Variable Coefficients

 
N
P   K h ( Bn )(nf ) Bn2  K c (nf , Bn )nfBn 
2

n 1

Key Advantage:
 Kh and Kc are functions (not constants any more) leading to
very accurate model
 Kh and Kc are tabulated in a look-up table and applied in FE
using cubic spline interpolation algorithm

Click to edit Master text styles

104 © 2012 ANSYS, Inc. January 12, 2015


Frequency Domain Core Loss

Click to edit Master text styles

105 © 2012 ANSYS, Inc. January 12, 2015


Identification of Variable Coefficients

P  K h ( B) fB  K c ( f , B) fB 
2 2

Using power loss


equation, there is no
uniqueness for Kc and Kh

Click to edit Master text styles

106 © 2012 ANSYS, Inc. January 12, 2015


Identification of Variable Coefficients
P
W   K h ( B ) B 2  K c ( f , B) fB 2
f
• Using the energy equation
allows to identify the
coefficients uniquely.

• First Kh(B) is identified at


0 Hz where the hysteresis
loss can be calculated by
extrapolation.

• Hysteresis loss is
commonly known as the
static or rate-independent
loss. Click to edit Master text styles

• Then Kc(f,B) is identified


for the whole range of f
and B.
107 © 2012 ANSYS, Inc. January 12, 2015
Identification of Variable Coefficients
P
W   K h ( B ) B 2  K c ( f , B) fB 2
f
• Using the energy equation
allows to identify the
coefficients uniquely.

• First Kh(B) is identified at


0 Hz where the hysteresis
loss can be calculated by
extrapolation.

• Hysteresis loss is
commonly known as the
static or rate-independent
loss. Click to edit Master text styles

• Then Kc(f,B) is identified


for the whole range of f
and B.
108 © 2012 ANSYS, Inc. January 12, 2015
Extraction Tool for Variable Coefficients

min e 2 ij  (Wti  Wi ) 2  (Wti  K hi ( Bi ) Bi2  K cij ( f j , Bi ) f j Bi2 ) 2

• Using the energy equation allows to identify the coefficients uniquely.

• First Kh(B) is identified at 0 Hz where the hysteresis loss can be calculated by


extrapolation.

• Hysteresis loss is commonly known as the static or rate-independent loss.

• Then Kc(f,B) is identified for the whole range of f and B.

Click to edit Master text styles

109 © 2012 ANSYS, Inc. January 12, 2015


Extraction of Coefficients
Steel sheet data

Click to edit Master text styles

110 © 2012 ANSYS, Inc. January 12, 2015


Custom User Defined Core Loss

1. Separation of loss components


2. Separation of losses in objects
(rotor, stator, etc)

Click to edit Master text styles

111 © 2012 ANSYS, Inc. January 12, 2015


Technical Notes: UDOs Quantities -
Description and Method of Calculation

112 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Input Power
Quantity Symbol: InputPower
Quantity Unit: W
1
Generator: Shaft (airgap) power
T T  (t )(t )dt  T .

Average power computed over an electric period T from the instantaneous


values of torque and speed

1 1
T T T T
Motor: Electric power p ( t ) dt  v(t ).i (t )dt

Average power computed over an electric period T from the instantaneous values of
current and voltage per phase

Note: v here is computed at the terminal so Rs and Le are considered


for both current and voltage sources

113 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Output Power
Quantity Symbol: OutputPower
Quantity Unit: W
1 1
Generator: Electric power
TT p ( t ) dt 
TT v(t ).i (t )dt

Average power computed over an electric period T from the instantaneous values of
current and voltage per phase

1
Motor: Shaft (airgap) power
T T  (t )(t )dt  T .

Average power computed over an electric period T from the instantaneous values of
torque and speed

114 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Torque & Speed


Quantity Symbol: Torque
Quantity Unit: NewtonMeter
1 1 n
 (t )dt   i
T T
Generator & Motor: Air-gap torque
n i 1
Average torque computed over an electric period T from the instantaneous
torque Moving1.Torque

Quantity Symbol: Speed


Quantity Unit: rpm

1 1 n
Generator & Motor: Rotor speed
T T (t )dt  n 
i 1
i

Average speed computed over an electric period T from


the instantaneous speed Moving1.Speed

115 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Power Factor
Quantity Symbol: PowerFactor
Quantity Unit: unity (1)

P
Generator & Motor: cos  
S
where P here is the average electric power and S is the apparent power computed as follows:

S  VI

where V here is the rms value of the phase voltage and I is the rms value of the phase current

Leading Power Factor:  1  cos   0

Lagging Power Factor: 0  cos   1

116 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Supply Current
Quantity Symbol: SupplyCurrent
Quantity Unit: A

rms value of stator phase current computed over an electric period T

T
1 2 1 n 2
T 0
i (t )dt   ii
n i 1

where i the instantaneous value of the phase current:

For current source: InputCurrent(Phase_name)

For voltage source or external circuit: Current(Phase_name)

117 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Phase Voltage (1/2)


Quantity Symbol: PhaseVoltage
Quantity Unit: V

Voltage source: rms value of input stator phase voltage:


T
1 2 1 n 2
T 0
v (t )dt   vi
n i 1
where v(t) = InputVoltage(Phase_name)

Current or external source: rms value of input stator phase voltage:


T
1 2 1 n 2

T 0
v (t )dt  
n i 1
vi where

Current(Phase_name)
di (t ) d (t )
v(t )  Rsi (t )  Le 
dt dt
InducedVoltage(Phase_name)

DC resistance End-winding inductance


118 © 2012 ANSYS, Inc. January 12, 2015
UDO Calculations

Phase Voltage (2/2)

For current or external source, the user can input the per phase
values of Rsand Le through the properties window

Note: Rs will also be


used to calculate
stranded loss and
efficiency in case of
current or external
source

119 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Core, Solid and Stranded losses


Quantity Symbol: CoreLoss, SolidLoss, StrandedLossR
Quantity Unit: W

Average loss computed over an electric period T

1 1 n
p(t )dt   pi
T T n i 1

For current or external source, the user will


need to input the per phase values of Rs
through the properties window to calculate Note: If the conductors are modeled as
the StrandedLossR solid, StrandedLossR will represent
the resistive loss of the end-winding
calculated from Rs

120 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Mechanical and Total losses


Quantity Symbol: MechanicalLoss
Quantity Unit: W

Friction and windage losses computed as a function of speed

P mech  Kc n 2 where n is the speed

and
P0mech where P0mech is the mechanical loss measured at the
Kc  2
n0 reference speed n0

Quantity Symbol: TotalLoss


Quantity Unit: W

TotalLoss = CoreLoss + SolidLoss + StrandedLoss + MechanicalLoss


121 © 2012 ANSYS, Inc. January 12, 2015
UDO Calculations

Efficiency
Quantity Symbol: Efficiency
Quantity Unit: %

Generally, the efficiency is defined as follows:


Pout Pout
 
Pin Pout  PTloss

Because the shaft (airgap) power is less sensitive to the time step size
than the electric power, the efficiency is consistently computed
from the shaft power and total losses:

Pshaft
Motor: 
Pshaft  PTloss

Pshaft  PTloss
Generator: 
Pshaft

122 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Power Balance
Quantity Symbol: PowerBalance
Quantity Unit: %

Percentage % error to check the differences (power balance)


between average input and output powers and losses;
only quantities included in the FE field solution are
considered
PowerBalan ce %  ( Pin  Pout  PEloss ) / Pin *100 where Pin  Pout  PEloss

and PEloss is the losses that were taken into the solution (not post-processed losses). Pin is
computed from induced voltage and input current in the case of current source, and form
input voltage and current in the case of voltage source
P
Factors that play roles: What kind of losses Eloss:
• Time step size • Core loss if it is incorporated in field solution
• Steady–state condition • Solid loss
• Nonlinear residual • StrandedLossR in case of voltage source

123 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Power Balance
Motor mode :Effect of time-step size and Nonlinear residual

XY Plot 1 Maxwell2DDesign1_MotorMode_TSC4
20.00
Curve Info

17.50 NR = 1e-6 PowerBalance


MachineSolutions1
PowerBalance_1
15.00 NR = 1e-2 Imported Time-step size has a
strong effect on
12.50 power balance but
nonlinear residual
Y1

10.00
has little effect
7.50

5.00

2.50

0.00
20.00 70.00 120.00 170.00 200.00
TimeSteps_per_period

124 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Power Balance
Motor mode: Effect of time-step size

XY Plot 2 Maxwell2DDesign1_MotorMode_TSC4
5.60

5.58

5.55 Shaft power is slightly


Curve Info

OutputPower affected by the time-


OutputPower [kW]

MachineSolutions1
5.53 step size
5.50

5.48

5.45

5.43

5.40
20.00 70.00 120.00 170.00 200.00
TimeSteps_per_period

125 © 2012 ANSYS, Inc. January 12, 2015


UDO Calculations

Power Balance
Motor mode: Effect of time-step size

XY Plot 2 Maxwell2DDesign1_MotorMode_TSC4
6.80

6.60

Curve Info
Electric power is
6.40 InputPower significantly affected by
InputPower [kW]

MachineSolutions1
the time-step size
6.20

6.00

5.80

5.60
20.00 70.00 120.00 170.00 200.00
TimeSteps_per_period

126 © 2012 ANSYS, Inc. January 12, 2015


Technical Notes: D-Q Solution -
Calculation Method

127 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

D-Q Solution Calculation Method (1/5)

q-axis
Phase diagram
e Lq Iq
E
e Ld Id
𝐼𝑠 = 𝐼𝑑2 + 𝐼𝑞2 ≤ 𝐼max
Vq
Vs
𝑉𝑠 = 𝑉𝑑2 + 𝑉𝑞2 ≤ 𝑉max Is
 Iq

d
I d   I max sin( )
I q  I max cos( )
-Vd -Id Ypm d-axis

Phasor diagram illustrating the operation of a PM machine based on the D-Q axis
theory where 𝛿 is the torque angle, 𝜑 is the power factor angle, 𝐸 is the induced
voltage, 𝜔𝑒 is the operating fundamental frequency

128 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

D-Q Solution Calculation Method (2/5)


i A   A 
id  T   d  T  
i   C iB    C 
   B
 q iC   q C 
v A   Ld 
vd  T   T
v   C v L  C * LABC * C
 B
 q
 q vC 
 
 
 cos   sin  
 
 LAA LAB LAC  2  2   2 
C  cos     sin     
LABC   LBA LBB LBC  3  3   3 
   
 LCA LCB LCC   
cos  2    sin   2  
  3   3 

θ = 0[deg]
129 © 2012 ANSYS, Inc. January 12, 2015 where  is in electrical degrees
UDO D-Q Calculations

D-Q Solution Calculation Method (3/5)

Ldd 
1
2
Lq  Ld   Lq  Ld cos(2 ) Self-inductance of the d-axis

Lqq 
1
2
Lq  Ld   Lq  Ld cos(2 ) Self-inductance of the q-axis

Lqd  Ldq 
1
Ld  Lq sin(2 ) Mutual-inductance of the
d- and q-axes
2

130 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

D-Q Solution Alignment (4/5)

• Number of poles is needed to


obtain the electrical position
ele  mech * P / 2
• The Alignment angle of d-q
coordinate system  0 is needed
to align the rotor (magnets)
with the stator phases
  ele  0
• Because the d-q coordinate
system rotates with the
electrical speed of the rotor,  0
is used to align the rotor with
the d-axis

If the rotor phases orientation is clockwise, the


user must select windings orientation as
131 © 2012 ANSYS, Inc. January 12, 2015 clockwise and vice versa
UDO D-Q Calculations

D-Q Solution Alignment (5/5)

Rotor may not be aligned


with d-axis. We align it by
 0 _ mech adjusting  0 so

 0   0 _ mech * P / 2

where  0 _ mech is the initial


rotor position and P is the
number of poles. Here the
+B
initial rotor position is
+B
aligned so Flux linkage of
phase A is its minimum (or
-C d-axis
maximum) when Is = 0 at
-C t0.
+A 90o electrical degrees Aligning  0 will keep Lq  Ld
+A
maximized when I s  I q  I d  0
132 © 2012 ANSYS, Inc. January 12, 2015
q-axis
UDO D-Q Calculations

Example: D-Q Solution Alignment


Note: If N & S poles of
magnets are reversed, the
procedure is the same by
aligning the rotor position to
have the flux linkage of
phase A at minimum.

 0   0 _ mech * P / 2  120 deg

Note: The alignment of the angle  0 is done automatically using the Toolkit
for any magnet or windings configuration!

133 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

Example: D-Q Solution Alignment

 0 is aligned so that flux linkage of phae A is at minimum at t  0 when I q  I d  0

134 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

Example: D-Q Solution Alignment

XY Plot 5 Ld_Lq_7_5deg_Emad
8.00
Curve Info

L(d-axis)
MachineSolutions1
gamma='180deg'
7.00 L(d-axis)
MachineSolutions1
gamma='0deg'
L(q-axis)
MachineSolutions1
gamma='180deg'
6.00
Y1 [mH]

L(q-axis)
MachineSolutions1
gamma='0deg'

5.00

4.00

3.00
-150.00 -100.00 -50.00 0.00 50.00 100.00 150.00
Iq [A]

135 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

D-Q Solution Results

XY Plot 8 Prius_design_IdIq
0.20 Curve Info
FluxLinkage(q-axis)
MachineSolutions1
Iq='-240A'
FluxLinkage(q-axis)
MachineSolutions1
Iq='-180A'
0.10 FluxLinkage(q-axis)
MachineSolutions1
Iq='-120A'
FluxLinkage(q-axis)
MachineSolutions1
Iq='-60A'
FluxLinkage(q-axis)
MachineSolutions1
-0.00
FluxLinkage(q-axis) [Wb]

Iq='0A'
FluxLinkage(q-axis)
MachineSolutions1
Iq='60A'
FluxLinkage(q-axis)
MachineSolutions1
Iq='120A'
-0.10 FluxLinkage(q-axis)
MachineSolutions1
Iq='180A'

0 is aligned so that Lq  Ld is maximized


FluxLinkage(q-axis)
MachineSolutions1
Iq='240A'

-0.20

-0.30

-0.40

-0.50
-250.00 -125.00 0.00 125.00 250.00
Id [A]

136 © 2012 ANSYS, Inc. January 12, 2015


UDO D-Q Calculations

D-Q Solution Results


FluxLinage(d-axis) [Wb]

FluxLinage(q-axis) [Wb]
0.2

0.2 0
0
-0.2 -0.2
-0.4 -0.4
300 300 300 300
200 200 200 200
100 100 100 100
0 0 0 0
-100 -100 -100
-100
-200 -200
-200 -200 Iq [A] Id [A]
Iq [A] -300 -300 Id [A] -300 -300

400
Torque [N.m]

200

-200

-400
300
200 200
100
0 0
-100
-200 -200
Iq [A] -300 Id [A]
137 © 2012 ANSYS, Inc. January 12, 2015
UDO D-Q Calculations

D-Q Solution vs. Finite-Element Analysis


300 120

200
100
Torque [N.m]

Voltage [V]
100
80
0
60
-100

-200 FEA 40
FEA
DQ-solution DQ-solution
-300 20
0 100 200 300 400 0 100 200 300 400
Current angle [degree] Current angle [degree]
Vd  Rs I d  e q
T  p  d I q  q I d 
3
2 Vq  Rs I q  e d
The validation of the steady state values
shows that the parameters of DQ solution
Vs  Vd  Vq
2 2
are accurate
138 © 2012 ANSYS, Inc. January 12, 2015
Technical Notes: Voltage Control

139 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Voltage Control Type


• Line-Line RMS Voltage
• Sinusoidal PWM
• A sinusoidal reference signal compared
with carrier frequency.
• The nonlinear region is also covered
• Third Harmonic PWM
• V = Ma*(cos(wt)+1/6*cos(3wt) ) where Ma
is the modulation index and w is the
frequency and t is the time.
• This modulation method utilizes about 15%
more voltage than sinusoidal PWM at about
Ma = 1.
• The nonlinear region is also covered

• Space Vector PWM


• Similarly to a third-harmonic injected
sinusoidal PWM, space vector modulation
utilizes about 21% more voltage than
sinusoidal PWM at Ma = 1.
The user can see the RMS fundamental voltage
• The algorithm is based on Reference [1].
changing based on the input Vdc and
modulation index
140 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Tech Notes

Technical Notes – Voltage Control Type

Example of sinusoidal PWM

141 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Tech Notes

Technical Notes – Voltage Control Type

Example of third-harmonic-injected sinusoidal PWM

142 © 2012 ANSYS, Inc. January 12, 2015


Efficiency Map Displayer

143 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer

• Efficiency Map Displayer is a user friendly tool that is developed in Python using
wxPython and Matlibplot packages to display Filled Contour Plots
• Integrated with the Design Toolkit as a callable .exe but the source code is not
included/shared unless requested

144 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer


• Import EfficiencyMap_motor.data

145 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer: List of Maps


• List:
1) Efficiency Map
2) Total Loss Map
3) Core Loss Map
4) Solid Loss Map
5) Winding Loss Map
6) Current Map
7) Gamma Map
8) Voltage Map
9) Power Factor Map
10) Torque Ripple Map
11) I (d-axis) Map
12) I (q-axis) Map
13) L (d-axis) Map
14) L (q-axis) Map
15) Flux linkage (d-axis) Map
16) Flux linkage (q-axis) Map

Note: if custom core loss was used, the loss for each object and component will be listed too.

146 © 2012 ANSYS, Inc. January 12, 2015


Efficiency Map Displayer: Custom User
Defined Core Loss
1. Separation of loss components
2. Separation of losses in objects
(rotor, stator, etc)

Click to edit Master text styles

147 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer: Properties of


Menu and Toolbar
Press to mark values and press again
Grid option is intended to change
(release) to remove them
the grid density

Torque unit can be


N.m or lbf-ft

148 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer: Properties of


Plots
• Change figure properties to make the map look the way you like.

149 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Num. of lines


• Number of contour lines can vary for contour fill and contour lines plot
• The number entered can be fixed as a single integer which will be the number of lines.
• Also it is possible to select certain lines from the contour to plot. The user needs to enter
an expression

m1:n1,m2:n2,….,m:n
where:
m is the total number of lines
n is the index step used in the interval between index m2 and m
n2 is the index step used in the interval between index m1 and m2
n1 is the index step used in the interval between index 0 and m1

150 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Num. of lines


• Example:
Num. of lines = 100

We see high concentration of the


contour lines at low level values
due to high gradient

In order to improve the plot, we


can select fewer lines at low level
values by using an expression

151 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Num. of lines


• Example:
Num. of lines = 70:10,90:5,100:1

This means we are selecting the following


indices only:
[0,10,20,30,40,50,60,70,75,80,85,90,91,9
2,93,94,95,96,97,98,99]

You can notice the contour lines in the


figure look more uniform now

152 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Bar Scale


• Bar Scale can be set to auto (default) or set by the user
• If the box is unckecked, Min and Max values can be changed
• The ticks on the bar also can be entered as an option in the Max box.
The logic as follows:
s0, s1, s2,…,sn, Max
where s1, s2,…., sn are the ticks and Max is the maximum value

Example: Ticks/Max = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 96.195

Ticks Max

153 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Axis Scale


• Axis Scale can be set to auto (default) or set by the
user
• If the box is unckecked, Speed and Torque ticks can
be changed
• If a single real number is entered in the Speed or
Torque box, then the program will use them as
Max/Min values and calculate ticks automatically
• However, the ticks can be entered following this logic
s1, s2,…,sn

Example:

154 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Contour Label


• Contour labels can be added to the contour lines
• User needs to check the box of the Contour lines first
• Then check the box of the Contour label and move mouse to the contour plot:
• Use left mouse button to draw a label on the lines (hotkey: Space)
• Use right mouse button to remove the previous label (hotkey: Backspace)
• Use middle mouse button (wheel) to finish and release the plot (hotkey: Esc)
• Note that the Contour labels should be done at the last step since any further change in
the plot will remove them

155 © 2012 ANSYS, Inc. January 12, 2015


Electric Machines Toolkit Step by Step

Efficiency Map Displayer – Contour Label

156 © 2012 ANSYS, Inc. January 12, 2015


PM Toolkit Examples:

PM Example 1: Efficiency Map Computation


PM Example 1b: Update Map
PM Example 1c: Update Map
PM Example 2: Custom Loss
PM Example 3: OPAL-RT Data Extraction
PM Example 4: Skew effect
157 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Purpose of the workshop is the simulation of efficiency maps

• Open PM_Toolkit_Ex1.mxwl

• Create User Defined Solution


• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average and RMS
Solutions

158 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Enter UDO properties below.
• Click OK

159 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Go to Maxwell2D -> Toolkit -> Electric Machines Design Toolkit –R16 -> Electric Machines
Design Toolkit

• Note: the user is recommended to have the DSO setup


configured before clicking on the toolkit.

160 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• From the General, select and enter the
highlighted items below:
• Machine Type: PM Synchronous Machine
• Voltage Control Type: Line-line RMS
• L-L RMS Voltage: 300V
• RMS Line Current: 200A
• In the simulation mode: select Both Modes
(for motor & generator). (Note user can
select Simulation mode to Motor only to
shorten simulation time)
• All options in other tabs can stay as default
• Click Run

• Note: the entries defining the Design of


Experiments Characteristics in the Simulation Tab
cannot be changed after “Run” is clicked, meaning
these entries will define the transient parametric
sweep. The entries for the Map Characteristics can
be edited during “Update” but the maximum speed
can only be lowered but not increased.
161 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Once Run is clicked, the toolkit will create a new design and run the parametric sweep.
• Simulation will run until it finishes all variations, in this case 680. DSO is key here to cut
simulation time.

162 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Keep Maxwell running
until you see data plots
of the Torque Speed
Curve.
• Both newly created
Designs will solve in
succession.
• Computation time will
depend on the number
of cores and CPU speed.
• In this case, we used a
4-core DSO setup.
This allows 4 transient
solutions to solve
simultaneously and
greatly cuts down on
total simulation time. Total Simulation of motor and generator modes
including 336 variations took ~ 123mins
163 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Some reports will be created in the Maxwell UI but most results are written in files under
the toolkit directory

164 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Some reports will be created in the Maxwell UI but most results are written in files under
the toolkit directory

165 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Some reports will be created in the Maxwell UI but most results are written in files under
the toolkit directory

166 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Some reports will be created in the Maxwell UI but most results are written in files under
the toolkit directory

167 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Results are written in CSV files under the toolkit directory PM_Toolkit_Ex1.toolkit created next to the project file

• Average steady-state & RMS results are saved in SimResults_Map_motor1.csv & SimResults_Map_generator1

• Note the transient data under “transient” folder are saved too

168 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap_motor1.data from File > Import Data. This file exists under
PM_Toolkit_Ex1.toolkit directory created by the script under the project directory.

169 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap_motor1.data from File > Import Data. This file exists under
PM_Toolkit_Ex1.toolkit directory created by the script under the project directory.

170 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation

171 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation

172 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation

173 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation


• Import data file EfficiencyMap_generator1.data from File > Import Data. This file exists
under PM_Toolkit_Ex1.toolkit directory created by the script under the project directory.

174 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1 – Efficiency Map Computation

175 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1b – Update Map


• Once the simulation is run, creating new
performance curves and efficiency maps become
quick.

• Open the solved project PM_Toolkit_Ex1.mxwl from


PM Example 1 (if not already open)

• Select (set active) the parametric sweep design


Prius_design_PM_MotorAndGenerator_EfficiencyM
ap1

• Go to Maxwell2D -> Toolkit -> Electric Machines


Design Toolkit – R16 -> Electric Machines Design
Toolkit

• In this example, we will change a few parameters in


the General Tab and Sweep & Map Tab: Sweep & Map Tab
1. Simulation Mode: Motor
2. DC Voltage = 400V
3. Modulation Index = 0.9
4. Speed step = 150rpm
5. Torque step = 40nm
6. Maximum speed = 6000rpm

176 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1b – Update Map


• Note: the user may uncheck the following to
speed up the update:
• Re-Read Transient Data and Re-Create
Response Surface
• This type of update doesn’t require re-
creating the surface response but if the
user is unsure, it is recommended to keep it
checked.
• Click Update

177 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1b – Update Map


• New map

178 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1b – Update Map


• New results

179 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1c – Update Map


• In certain cases, the user may need to update the UDO setup such
as the end winding- inductance.

• Open the solved project PM_Toolkit_Ex1.mxwl from PM Example 1


(if not already open)
• Select (set active) the parametric sweep design
Prius_design_PM_MotorAndGenerator_EfficiencyMap1

• Go to Maxwell2D -> Results-> User Defined Solutions


• Click on Edit
• Enter 0 for all 9end-winding) inductance values
• Click OK

180 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1b – Update Map


• Go to Maxwell2D -> Toolkit -> Electric Machines
Design Toolkit – R16 -> Electric Machines Design
Toolkit

• In this example, we will change a few parameters in


the General Tab and Sweep & Map Tab:
1. Simulation Mode: Motor
2. DC Voltage = 400V
3. Modulation Index = 0.9
4. Speed step = 150rpm
5. Torque step = 40nm
6. Maximum speed = 6000rpm

Sweep & Map Tab

181 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1c – Update Map


• Go to Maxwell2D -> Toolkit -> Electric Machines Design –R16 -> Toolkit Electric Machines Design Toolkit

• From the Simulation Tab, check box Re-Read Transient and Re-Create Response Surface

• Click Update

Note: Not all Update types require re-reading transient


data and re-creating the response surface.

182 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1c – Update Map


• New map

0H
0.03 mH

183 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 1c – Update Map


• New results

184 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Purpose of the workshop is applying custom loss for the simulation of efficiency maps

• Open PM_Toolkit_Ex1.mxwl

• Create User Defined Solution


• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average and RMS
Solutions

185 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Enter UDO properties below.
• Click OK

186 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Go to Maxwell2D -> Toolkit -> Electric Machines Design Toolkit –R16 -> Electric Machines
Design Toolkit

• Note: the user is recommended to have the DSO setup


configured before clicking on the toolkit.

187 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• From the General, select and enter the
highlighted items below:
• Machine Type: PM Synchronous Machine
• Voltage Control Type: Line-line RMS
• L-L RMS Voltage: 300V
• RMS Line Current: 200A

188 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• From the Winding Tab,
• Uncheck Align the D-Q Axis by the Script (note the
design is pre-aligned in the UDO setup)
• Check Calculate Winding Loss from AC Resistance
• Click on Upload From File to browse for file Rac.txt

189 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• From the Custom Loss Tab, check:
• Use Custom Core Loss
• Frequency-Domain Model
• Use Variable Coefficients

• In the List of Objects:


• Select Stator and enter
– Model Depth = 0.0833566m
– Stacking Factor = 0.96
– Browse for the file that contains the measured loss data
• Click on the + Button and select Rotor

• Click Run

• Notes:
– Symmetry multiplier will be automatically identified from
the design but not the Model Depth
– No need to browse for the loss file for each object
separately unless each object has its own loss files. Same
file will be copied from the first row to all next rows.

190 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• The core loss file. The file format must follow a similar structure as below. The unit of the flux density is T and Hz
for frequency. The loss data must be in W/kg. The loss data do not have fill the whole B-f grid

191 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Once Run is clicked, the toolkit will create a new design and run the parametric sweep.
• Simulation will run until it finishes all variations, in this case 160. DSO is preferred here to
cut simulation time.

192 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap_motor1.data from File > Import Data. This file exists under
PM_Toolkit_Ex2.toolkit directory created by the script under the project directory.

193 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Custom Loss


• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap_motor1.data from File > Import Data. This file exists under
PM_Toolkit_Ex2.toolkit directory created by the script under the project directory.

194 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 2 – Loss Separation

195 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• Purpose of the workshop is extracting OPAL-RT Data

• Open PM_Toolkit_Ex3.mxwl

• Create User Defined Solution


• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average and RMS
Solutions

196 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• Enter UDO properties below.
• Click OK

197 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• Go to Maxwell2D -> Toolkit -> Electric Machines Design Toolkit – R16 -> Electric Machines
Design Toolkit

• Note: the user is recommended to have the DSO setup


configured before clicking on the toolkit.

198 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• From the General, select and enter the
highlighted items below:
• Machine Type: PM Synchronous Machine
• Voltage Control Type: Line-line RMS
• RMS Line Current: 400A
• L-L RMS Voltage: 100V
• In the simulation mode: select Both Modes
(for motor & generator). (Note user can
select Simulation mode to Motor only to
shorten simulation time)

• Note: If the user is interested in OPAL-RT data only,


the voltage will have no effect. The user can enter
any arbitrary value.

199 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• From the Sweep & Map Tab, enter the
items below:
• Total Number of Electric Periods Simulated: 1
• Number of Time Steps per Electric Period: 40
• Number of Angle Sweep Points: 40
• Number of Speed Points: 1
• All options in this tab and in other tabs can be
kept as default
• Notes:
1. The current angle Gamma will be swept for
360o so the user must make sure enough
number of Gamma intervals are used.
2. This run will be static specific to OPAL-RT
needs only and will not compute other
performance data. If the user is also
interested in the characterization of the
machine such as ECE loss data, performance
curves and efficiency maps, the Number of
Speed Points must be changed to 4 or
higher before clicking Run.

200 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• From the Simulation Tab, check
• Create ECE and OPAL-RT Data
• Click Run

• Note: This run will be static specific to OPAL-RT


needs only and will not compute other
performance data. If the user is also interested in
the characterization of the machine such as ECE
loss data, performance curves and efficiency maps,
the Number of Speed Points must be changed to 4
or higher before clicking Run.

201 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• Once Run is clicked, the toolkit will create a new design and run the parametric sweep.
• Simulation will run until it finishes all variations, in this case 160. DSO is recommended
here to cut simulation time.

202 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• Once Run is complete with simulation and data post-processing, a message will show in the
Global Messages saying: Toolkit has extracted OPAL-RT data successfully
• A MATLAB mat file will be written under the toolkit directory created next to the project file

203 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 3 – OPAL-RT Data Extraction


• The MATLAB file contains data arrays for inductance, flux linkages & D-Q quantities.

204 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Purpose of the workshop is studying the effect of skew on the torque speed curve and efficiency maps

• Open PM_Toolkit_Ex4.mxwl

• Create User Defined Solution


• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average and RMS
Solutions

205 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Enter UDO properties below.
• Click OK

206 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Go to Maxwell2D -> Toolkit -> Electric Machines Design Toolkit –R16 -> Electric Machines
Design Toolkit

• Note: the user is recommended to have the DSO setup


configured before clicking on the toolkit.

207 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• From the General, select and enter the
highlighted items below:
• Machine Type: PM Synchronous Machine
• Voltage Control Type: Line-line RMS
• L-L RMS Voltage: 300V
• RMS Line Current: 200A

208 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• From the Windings Tab:
• Uncheck Align the D-Q Axis by the Script

• Note: This design is already aligned via the UDO so


there is no need to align by the script. This save
simulation time.

209 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• From the Advanced Tab:
• Check Calculate the Effect of Skewing
• Check Single-Sided Staircase
• Skew Angle [Mech. deg]: 2.5
• Number Segments: 4
• Click Run

210 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Once Run is clicked, the toolkit will create a new design and run the parametric sweep.
• Simulation will run until it finishes all variations, in this case 208. DSO is preferred here to
cut simulation time.

• Note: This design will contain


extra number of variations
because of skewing.

211 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Results

Note: The maximum torque is reduced due to the skew effect. The user can compare the
result with PM Example 1
212 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 4 – Skew
• Results

Note: The results of the torque-gamma curves are the post-processed results after the
skew effect is considered.
213 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 4 – Skew
• Results

Note: The user may plot the raw torque-gamma curves before post-processing using the
UDOs
214 © 2012 ANSYS, Inc. January 12, 2015
Toolkit – Examples

PM Example 4 – Skew
• Results

215 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew
• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap_motor1.data from File > Import Data. This file exists under
PM_Toolkit_Ex4.toolkit directory created by the script under the project directory.

216 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

PM Example 4 – Skew

217 © 2012 ANSYS, Inc. January 12, 2015


IM Toolkit Examples

IM Example 1: Efficiency Map Computation


IM Example 1b: Update Map
IM Example 2: Use of LSDSO

218 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation

• The example demonstrates the use of the toolkit to compute efficiency maps for an induction motor
• Open IM_Toolkit_Ex1.mxwl
• Change the excitation type to External for the three phase windings
• Note that the user does not need to do anything else except change the excitation from voltage to
external. The toolkit automatically assigns the external circuit
• Note here that the stator resistance and end-winding inductance are copied from the original voltage
excitation setup

219 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Create User Defined Solution
• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average
and RMS Solutions

220 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Enter UDO properties:

The properties to be entered:


• Poles = 4
• Mech Loss = 100 W
• Ref Speed = 500 rpm
• Resistance = 0.669 ohm
• Inductance = 0.000229 H

Note here that the stator resistance and


end-winding inductance are copied from
the original voltage excitation setup.
Also in IMs, since the machine is a
voltage-fed via an external circuit, the
user cannot edit the inductance and
resistance after the run.

221 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Go to Maxwell2D > Toolkit > Electric Machines Design Toolkit Electric Machines Design
Toolkit

• Note: the user is advised to have the DSO setup configured


before clicking on the toolkit.

222 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• From the General, select and enter the highlighted items below:
• Machine Type: Induction Machine
• Voltage Control Type: Space Vector PWM
• RMS Line Current: 20A
• DC Voltage: 214V
• Modulation Index: 0.9

223 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• From the Sweep & Map, enter the highlighted items below:
• Number of Frequency Sweep Points : 20
• Number of Speed Points: 80
• Number of Torque Points: 20
• Torque Threshold: 0.1
• Maximum Speed: 6000 rpm

• Note: the entries defining the Design of


Experiments Characteristics cannot be
changed after “Run” is clicked, meaning these
entries will define the transient parametric
sweep. The entries for the Map
Characteristics can be edited during “Update”
but the maximum speed can only be lowered
but not increased.

• Click Run

224 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Once Run is clicked, the toolkit will create a new design and run the parametric sweep.
• Simulation will run until it finishes all variations, in this case 1000. DSO is key here to cut
simulation time.

225 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Some reports will be created in the Maxwell UI but most results are written in files under
the toolkit directory

226 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Results are written in CSV files under the toolkit directory

227 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Computation


• Start the Efficiency Map Displayer from the toolkit menu: Maxwell2D > Toolkit > Electric
Machines Design Toolkit > Efficiency Map Displayer
• Import data file EfficiencyMap1.data from File > Import Data. This file exists under
IM_Toolkit_Ex1.toolkit directory created by the script under the project directory.

228 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1 – Efficiency Map Displayer

229 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1b – Update Map


• Once the simulation is run, creating new
performance curves and efficiency maps
become quick.
• Open the solved project IM_Toolkit_Ex1.mxwl
from Example 1
• Select (set active) the parametric sweep design
Maxwell2DDesign1_IM_MotorMode_Efficiency
Map1
• Go to Maxwell2D > Toolkit > Electric Machines
Design Toolkit Electric Machines Design Toolkit
• In this example, we will change a few
parameters in the General Tab and Sweep &
Map Tab:
1. DC Voltage = 200V
2. Speed step = 100rpm
3. Maximum speed = 1500rpm
• Click Update

230 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1b – Update Map


• New map

231 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1b – Update Map


• New curves

232 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 1b – Update Map


• New results

233 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO

• The example demonstrates the use of the toolkit to compute efficiency maps for an induction motor
using Large-Scale DSO.
• This example is almost a combination of the steps done in Example 1 & 2 with additional steps
• Open IM_Toolkit_Ex2.mxwl
• Change the excitation type to External for the three phase windings
• Note that the user does not need to do anything else except change the excitation from voltage to
external. The toolkit automatically assigns the external circuit
• Note here that the stator resistance and end-winding inductance are copied from the original voltage
excitation setup

234 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LSDSO


• Create User Defined Solution
• Maxwell2D -> Results -> Create User Defined Solution -> Electric Machine Solutions – R16 -> Average
and RMS Solutions

235 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Enter UDO properties
• Note here that the stator resistance and end-winding inductance are copied from the original
voltage excitation setup

The properties to be entered:


• Poles = 4
• Mech Loss = 100 W
• Ref Speed = 500 rpm
• Resistance = 0.669 ohm
• Inductance = 0.000229 H

236 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Go to Maxwell2D > Toolkit > Electric Machines Design Toolkit Electric Machines Design
Toolkit

• Note: the user is advised to have the DSO setup configured


before clicking on the toolkit.

237 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• From the General, select and enter the highlighted items below:
• Machine Type: Induction Machine
• Voltage Control Type: Space Vector PWM
• RMS Line Current: 20A
• DC Voltage: 214V
• Modulation Index: 0.9

Note: the machine type is identified


automatically for IMs with end connection

238 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• From the Sweep & Map, enter the highlighted items below:
• Number of Frequency Sweep Points : 20
• Number of Speed Points: 80
• Number of Torque Points: 20
• Torque Threshold: 0.1
• Maximum Speed: 6000 rpm

• Note: the entries defining the Design of


Experiments Characteristics cannot be
changed after “Run” is clicked, meaning these
entries will define the transient parametric
sweep. The entries for the Map
Characteristics can be edited during “Update”
but the maximum speed can only be lowered
but not increased.

239 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• From the Simulation Tab:
• Check Box Use LSDSO
• Click on Create LSDSO Setup
• This will create the appropriate design for
LSDSO runs but the toolkit will not run the
design/parametric setup

240 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Save the project that contains the design of the created LSDSO Setup

241 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Close the project from File > Close.
• At this stage, the user is free where to run the project of LSDSO setup. In particular, we need
to run ParmetricSetup1 in design Maxwell2DDesign1_IM_MotorMode_EfficiencyMap1
• In this example, we will use the Job Management feature from the Maxwell GUI to submit a
batch run for LSDSO setup but the user can run via command line in Windows or Linux.
• Go to Tools > Job Management > Submit Job

242 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Browse for the Project IM_Toolkit_Ex2.mxwl

243 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Browse for the Project IM_Toolkit_Ex2.mxwl
• Check Single Setup
• Select
Maxwell2DDesign1_IM_MotorMode_Efficiency
Map1:Optimetrics:ParametricSetup1
• Check Use large scale DSO

244 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• From the Compute Resources Tab:
• Enter Node name: (the machine name
or to run the simulaiton0
• Enter the number of Tasks and Cores. In
this case both take 8.
• Note for 2D parametric setup, # of Task
must be the same as # of Cores.
• User may click on Preview Submission but at
this moment, the job is ready to be submitted.
• Click Submit Job

245 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• User may check Begin monitoring this job now.
• User can close all windows and let the job runs until it is complete

246 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• User may check Begin monitoring this job now.
• User can close all windows and let the job runs until it is complete

247 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 2 – Use of LS-DSO


• Once the simulation is complete, creating
performance curves and efficiency maps
becomes quick.
• Open the solved project IM_Toolkit_Ex2.mxwl
• Select (set active) the parametric sweep design
Maxwell2DDesign1_IM_MotorMode_Efficiency
Map1
• Go to Maxwell2D > Toolkit > Electric Machines
Design Toolkit Electric Machines Design Toolkit
• (Note from the simulation tab, the Job ID(s) will
be listed automatically. )
• Click Update

248 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 3 – Efficiency Map Computation


• Reports will be created in the Maxwell UI but most results are written in files under the
toolkit directory

249 © 2012 ANSYS, Inc. January 12, 2015


Toolkit – Examples

IM Example 3 – Efficiency Map Computation


• Results are written in CSV files under the toolkit directory

250 © 2012 ANSYS, Inc. January 12, 2015


User Defined Outputs (UDO) - Overview

251 © 2012 ANSYS, Inc. January 12, 2015


UDO Overview

User Defined Outputs (UDOs)


• Available since R14 (Maxwell 15) but Optimetrics
calculations were not available.
• Optimetrics is integrated with UDOs in R14.5 (Maxwell 16)

• Simplorer
• Maxwell
• RMxprt
• Q3D
• HFSS
• Designer

252 © 2012 ANSYS, Inc. January 12, 2015


UDO Overview

User Defined Outputs (UDOs)


• Flexible IronPython scripting for post-processing calculations and
creating customized reports.
• Scripts are text files with .py extensions.
The UDO scripts need to be placed in
UserDefinedOutputs directory under either of
syslib, userlib or Personallib following any
directory structure needed for organization.

IronPython is Python with some


253 © 2012 ANSYS, Inc. January 12, 2015
enhancements and limitations
UDO Overview

UDOs – folder hierarchy


UserDefinedOutputs

Electrical
Other Transformers
Machines
Solutions Solutions Main script
Solutions

Lib Efficiency.py

.py Packages

.dll
BaseExampleUDO.py
Menu items can be updated if user makes
changes to the folder structure
254 © 2012 ANSYS, Inc. January 12, 2015
UDO Overview

UDOs – base class file & Lib directory

• BaseExampleUDO.py
This file is standard that
contains the base class
that can be used as a
basis in the main scripts.
No need to edit it.
• All additional Python or
dll files or packages can
be placed/linked in the
Lib directory

255 © 2012 ANSYS, Inc. January 12, 2015


User Defined Outputs of Electric Machines

1. Average & RMS Solutions


2. Single Phase Induction Machines
3. Transient D-Q Solutions
256 © 2012 ANSYS, Inc. January 12, 2015
UDOs Electric Machines

Installation: Creation of UDO Directory

• If not already exist, create a folder UserDefinedOutputs under userlib or


Personallib
• Place the directory Electric Machines Solutions – R16 into the
UserDefinedOutputs directory of UserDefinedOutputs. Your directory should
look like this:
C:\Program Files\AnsysEM\AnsysEM16.0\Win64\Maxwell\syslib\UserDefinedOutputs\Electric Machines Solutions – R16

or

C:\Users\edlala\Documents\Ansoft\PersonalLib\UserDefinedOutputs\Electric Machines Solutions – R16

Note: Personallib ensures read/write


permissions

Note: Maxwell R15 (2014) and Maxwell R16


(2015) are by default installed under a new
directory AnsysEM
257 © 2012 ANSYS, Inc. January 12, 2015
UDOs Electric Machines

1. Average & RMS Solutions


• Basic average & RMS quantities for electric machines (motors and
generators) computed by the Transient Solver in Maxwell2D or
Maxwell3D

258 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Average & RMS Solutions (1/3)
• Input Power: Total average input power; electric power for motors and shaft
power for generators
• Output Power: Total average out power; electric power for generators and
shaft power for motors
• Torque: Total average torque
• Torque Ripple: Torque Ripple computed from the maximum and minimum
values of instantaneous torque
• Speed: Average speed
• Power Factor: Computed as ElectricPower/ApparentPower
• Supply Current: RMS phase current, averaged over the n-phases
• Phase Voltage: RMS phase voltage, averaged over the n-phases
• Core Loss: Averaged core loss
• Solid Loss: Averaged solid loss
259 © 2012 ANSYS, Inc. January 12, 2015
UDOs Electric Machines

List of Computed Quantities


Average & RMS Solutions (2/3)
• StrandedLossR: Averaged DC resistive loss in the stator windings
(+ field windings)
• Mechanical loss: Friction, windage losses calculated as a function of
speed as Ka*omega^2
• Total Loss: Averaged total loss
• Efficiency: Efficiency computed from the shaft power and losses
• PowerBalance: Percentage (%) error to check for the differences (power
balance) between input and output powers and losses; only quantities
considered in the FE field solution are considered
• V(d-axis): Voltage in the d-axis computed based on Park’s transformation
in rotor frame
• V(q-axis): Voltage in the q-axis computed based on Park’s transformation
in rotor frame

260 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Average & RMS Solutions (3/3)
• I(d-axis): Current in the d-axis computed based on Park’s transformation
in rotor frame
• I(q-axis): Current in the q-axis computed based on Park’s transformation
in rotor frame
• L(d-axis): Inductance in the d-axis computed based on dq0
transformation
• L(q-axis): Inductance in the q-axis computed based on dq0
transformation
• FluxLinkage(d-axis): Flux linkage in the d-axis computed based on
Park’s transformation
• FluxLinkage(q-axis): Flux linkage in the q-axis computed based on
Park’s transformation

261 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

2. Single Phase Induction Machines


• Basic average & RMS quantities for single phase machines (motors
and generators) computed by the Transient Solver in Maxwell2D or
Maxwell3D.

262 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Single Phase Machines (1/2)
• Input Power: Total average input power; electric power for motors and shaft
power for generators
• Output Power: Total average out power; electric power for generators and
shaft power for motors
• Torque: Total average torque
• Speed: Average speed
• Power Factor: Computed as ElectricPower/ApparentPower
• Main Current: RMS current of the main winding
• Main Voltage: RMS voltage of the main winding
• Auxiliary Current: RMS current of the auxiliary winding
• Auxiliary Voltage: RMS voltage of the auxiliary winding

263 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Single Phase Machines (2/2)
• Core Loss: Averaged core loss
• Solid Loss: Averaged solid loss
• StrandedLossR: Averaged DC resistive loss in the stator windings (+
field windings)
• Mechanical loss: Friction, windage losses calculates as a function of
speed as Ka*omega^2
• Total Loss: Averaged total loss
• Efficiency: Efficiency computed from the shaft power and losses
• PowerBalance: Percentage (%) error to check for the differences (power
balance) between input and output powers and losses; only quantities
considered in the FE field solution are considered

264 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

3. Transient D-Q Solutions


• Instantaneous values of Id, Iq, Ld, Lq, and flux linkages of λd, λq
for electric machines (motors and generators) computed by the
Transient Solver in Maxwell2D & Maxwell3D

265 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Transient D-Q Solutions (1/2)
• V(d-axis): Transient voltage in the d-axis computed based on Park’s
transformation in rotor frame
• V(q-axis): Transient voltage in the q-axis computed based on Park’s
transformation in rotor frame
• I(d-axis): Transient current in the d-axis computed based on Park’s
transformation in rotor frame
• I(q-axis): Transient current in the q-axis computed based on Park’s
transformation in rotor frame
• L(d-axis): Transient inductance in the d-axis computed based on dq0
transformation. The user is able to align the rotor position by changing the
initial position of the d-q coordinate system
• L(q-axis): Transient inductance in the d-axis computed based on dq0
transformation. The user is able to align the rotor position by changing the
initial position of the d-q coordinate system

266 © 2012 ANSYS, Inc. January 12, 2015


UDOs Electric Machines

List of Computed Quantities


Transient D-Q Solutions (2/2)
• FluxLinkage(d-axis): Transient flux linkage in the d-axis computed based on
Park’s transformation. The user is able to align the rotor position by changing
the initial position of the d-q coordinate system
• FluxLinkage(q-axis): Transient flux linkage in the q-axis computed based on
Park’s transformation. The user is able to align the rotor position by changing
the initial position of the d-q coordinate system
• Ldd: Transient self-inductance of the d-axis computed based on dq0
transformation. The user is able to align the rotor position by changing the
initial position of the d-q coordinate system
• Lqq: Transient self-inductance of the q-axis computed based on dq0
transformation. The user is able to align the rotor position by changing the
initial position of the d-q coordinate system
• Lqd = Ldq: Transient mutual inductance between the q and d-axes
computed on the q-axis with a current on the d-axis. The user is able to align
the rotor position by changing the initial position of the d-q coordinate system

267 © 2012 ANSYS, Inc. January 12, 2015


Properties of the UDO Scripts
for Electric Machines

268 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Properties of the UDO scripts


for Electric Machines
The following properties are in the developed
UDO scripts:

 Generalized
 Automated
 Efficient
 Ease of use
 Extendible

269 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Support of All Typical AC Machines:


Generalized & Automated
 All typical AC machines (motors & generators) are covered and
identified automatically for Maxwell2D & Maxwell 3D:
 Adjustable-Speed Synchronous Machines
 Brushless PM Machines
 Generic Rotating Machines (AC)
 Non-salient Synchronous Machines
 Switched Reluctance Machines
 Line Start Synchronous Machine
 Induction Machines

270 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Any n-Phase Electric Machine:


Generalized & Automated
 For the above electric machines, any n-phase machine is
supported including:
 Electric machines with field windings

Note: Windings’ names starting


Note: For Ld and Lq calculation, only
with Field, field, FIELD, DC, dc
2-phase, 3-phase, 4-phase, 5-phase
are treated as field windings.
machines are supported.
E.g., Field_1, fieldA, DC_f1, etc

271 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Any Source Type: Voltage, Current,


External: Generalized & Automated
 All types of excitations are supported:
 Current source
 Voltage source
 External circuit (DC)
 External circuit (PWM)
 Solid and Stranded conductors are
supported

272 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

All Probes Are Dynamic: Easy, Automated


& Efficient
 Probes link the FEA result to the UDO script.
 All probes are dynamic probes: code is written to automatically
assign the right probes to the right places. User just assigns any
transient quantity to define the Solution.

273 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Averaging on Last Electric Period:


Accurate, Efficient & Automated
 The averaging and post-processing for Average & RMS Solutions are
done on the last electric period in the simulation, which is automatically
identified by the code using the number of poles and speed.

Name X Y XY Plot 2 Maxwell2DDesign1_ACVnorm


m1 120.00
8.2000 97.6263 Curve Info
m2 68.2000 47.1699 Current(PhaseA)
Setup1 : Transient

m1
100.00

80.00
T=1/f
60.00
Current(PhaseA) [A]

m2

40.00

20.00

0.00

-20.00

-40.00

-60.00
0.00 20.00 40.00 60.00 80.00 100.00 120.00 140.00
Time [ms]

274 © 2012 ANSYS, Inc. January 12, 2015


UDO Properties

Ld, Lq Calculation: Automated, Accurate


& Easy
• Ld, Lq are easily calculated by the transient solver using either the Average &
RMS Solution or the Transient d-q Solution.
• It is required to check the Inductance Matrix Computation.
It’s unchecked by default. From the Menu, select:
Maxwell 2D –> Design Settings…, Matrix Computation tab.

275 © 2012 ANSYS, Inc. January 12, 2015


Usage of UDOs:
Step-by-Step Description

276 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Step 1) Create User Defined Solution

• The UDOs are ready to create and use once the Electric Machines
Solutions is placed into UserDefinedOutputs under syslib (see slide
16)
• Create User Defined Solution by right clicking on Results. This must
be done while the simulation is not running

277 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Step 2) Create User Defined Solution

• Select e.g., Average and RMS Solutions

Note: More than a Solution can be created


278 © 2012 ANSYS, Inc. January 12, 2015
UDO Step by Step

Step 2) Create User Defined Solution (3/3)


• Solution name MachineSolution1, MachineSolution2 , etc, will be
given by default but it can be edited
• Select the Solution Setup, e.g. Setup1, Setup2, etc
• Select transient quantity as a probe. It can be any transient quantity,
e.g. Moving1.Torque, InputCurrent, InducedVoltage, etc
• Specify the properties e.g., number of poles, DC resistances, etc

279 © 2012 ANSYS, Inc. January 12, 2015 This window will get grayed out once probe assigned
UDO Step by Step

Step 3) Create User Defined Report (1/4)


• After creating a User Defined Solution, a new item will appear under
Results as Create User Defined Report

New menu item


just created

Before creating a User Defined Solution After creating a User Defined Solution
280 © 2012 ANSYS, Inc. January 12, 2015
UDO Step by Step

Step 4) Create User Defined Report (2/4)


• Select the type of report e.g., Rectangular Plot or Data Table. It’s
recommended to create reports after simulation is done

281 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Step 5) Create User Defined Report (3/4)

• Select the UDO Solution


• Category will contain
Variables, Output Variables,
Average & RMS Values
• The list of Quantities defined
in Average & RMS Values will
be automatically populated

282 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Step 5) Create User Defined Report (4/4)

• You can select Primary


Sweep variable
• Or the x-axis can also be
an UDO defined Quantity
• Click New Report

Efficiency vs Speed current_MotorMode_TSC2


97.50

95.00

92.50
Efficiency

90.00

87.50
MachineSolutions1
Freq_Base_TSC='10.05211883Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='301....
85.00 MachineSolutions1
Freq_Base_TSC='20.10423766Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='603....

MachineSolutions1
Freq_Base_TSC='30.15635649Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='904....

MachineSolutions1
82.50 Freq_Base_TSC='40.20847532Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='1206...

MachineSolutions1
Freq_Base_TSC='50.26059416Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='1507...

MachineSolutions1
Freq_Base_TSC='60.31271299Hz' Imax_TSC='39.99965064A' LoadAngle_TSC='350.6913473deg' Speed_Base_TSC='1809...

80.00 MachineSolutions1
Freq_Base_TSC='70.36483182Hz' Imax_TSC='33.91031766A' LoadAngle_TSC='337.3980793deg' Speed_Base_TSC='2110...
0.00 2000.00 4000.00 6000.00 8000.00
Speed [rpm] MachineSolutions1
Freq_Base_TSC='80.41695065Hz' Imax_TSC='31.55322824A' LoadAngle_TSC='330.5894098deg' Speed_Base_TSC='2412...

283 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Create Transient D-Q Solution


• User can create as many UDO Solutions as needed
• First created will be a default
• Select the Solution to be used in the report

284 © 2012 ANSYS, Inc. January 12, 2015


UDO Step by Step

Modify existing UDOs


• User can Delete an exiting solution,
• Reload the script associated with the solution whenever there’s a code
change
• Edit the solution, e.g., name, selected probes, or specified properties

285 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing of IPM Example 4: Transient D-Q solution


Example 2: D-Q Alignment Example 5: Single-phase machine
Example 3: Parametric Example 6: Three-phase induction machine
Example 7: 3-D IPM

286 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing of Three-Phase


IPM Motor
• Open UDO_Example_1.mxwl
• Check Compute Inductance Matrix
from Maxwell2D > Design Settings >
Matrix Computation
• Change the Initial Position to 7.5 deg
• Analyze Setup1

287 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing
1
• After simulation is done, Create
User Define Solution
• Select Average and RMS
Solutions item from the menu

288 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing

• Select a probe (any


transient quantity e.g.,
Moving1.Torque) 1

• Specify properties:

1. Poles = 8 2
2. Mechanical losses 100 W
3. Reference Speed 1000
4. DC resistances for each
phase 0.04 ohm
5. End-winding inductance
0.03 mH
6. Click OK (Keep defaults
properties for the rest)

289 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing
• Create User Defined Report 3
(Data Table)
• Select all Quantities under
Average & RMS Values

290 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 1: Postprocessing

• Transpose the table to get a column


• Uncheck Show Solution Name

Note: We did not yet align the


d-q coordinate system in this
example
291 © 2012 ANSYS, Inc. January 12, 2015
UDO Examples

Example 2: Postprocessing & D-Q


Alignment
• Use the same project in
Example 1 and edit design
Prius_design_Postprocessing
• Edit User Defined Solutions 1

• Enter new properties values


below for number of poles,
initial position of d-q
coordinate system and click
OK 3
2

292 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 2: Postprocessing & D-Q


Alignment
• We adjusted the initial
position of d-q coordinate
system to align d-axis with
rotor position

 0   mech * P / 2  (7.5) * 8 / 2  30 deg

Note that the alignment is done so that


Id, Iq are correctly aligned
293 © 2012 ANSYS, Inc. January 12, 2015
UDO Examples

Example 3: Parametric
• Use the same project
“IPM_Motor.mxwl” of Example 1
• Copy Design
“Prius_design_Postprocessing”, paste it 1
in the same project, and rename it as
“Prius_design_Parametric”
• Add a Parametric sweep of Imax (0-
240A) step 40A.
• Analyze ParametricSetup1 2

294 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 3: Parametric
• Create User Defined Report 1
(Rectangular Plot)
• Select Imax as the Primary Sweep
and I(q-axis) for x axis
• Select L(q-axis) as the quantities in Y
to plot and then Create Report
• Repeat steps for Ld vs Id 2

295 © 2012 ANSYS, Inc. January 12, 2015


3
UDO Examples

Example 3: Parametric
1
• Create User Defined Report
(Rectangular Plot)
• Change the Primary Sweep Values as
shown
• Change the X to an UDO quantity
(Phase Voltage)
• Select Efficiency as the quantity in Y
to plot
2

296 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 4: Transient D-Q Solution

• This example requires the solution of


Example 1, namely project
UDO_Example_1.maxwl and design 1
Prius_design_Postprocessing
• Since simulation is done, Create User
Define Solution
• Select Transient D-Q Solutions item
from the menu
• Select a probe (any transient quantity
e.g., Moving1.Torque) 2
• Enter new properties values below for
number of poles, initial position of d-q 3
coordinate system, mechanical losses
and reference speed

297 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 4: Transient D-Q Solution

• Create User Defined Report 1


(Rectangular Plot)
• Select D-Q solution1 from Solution
menu
2
• Select L(d-axis) and L(q-axis) for
quantities to plot and click New Report

298 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 5: Single Phase Motor


1
• Open project
Single_Phase_Motor.maxwl, design
Maxwell2DDesign1
• Solve Analysis Setup1
• After simulation is done, Create User
Define Solution
• Select Solutions for Special Machines 2
> Single Phase Induction Machines
item from the menu
• Select probes for main and Auxiliary
windings
• Enter properties values below 3

299 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 5: Single Phase Motor

• Create User Defined Report (Data Table)


• Select Quantities shown under Average &
RMS Values and click New Report
• Transpose the table to get a column and
Uncheck Show Solution Name

300 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 6: Three-Phase Induction Motor


1
• Open project Induction_Motor.maxwl,
design Maxwell2DDesign1
• Solve Analysis Setup1
• After simulation is done, Create User
Define Solution
• Select Average & RMS Solutions item
from the menu 2
• Select a probe (any transient quantity
e.g., Moving1.Torque)
• Enter properties values below
3
• Notice this is a voltage-fed machine.
Therefore, there are no properties for
DC resistance and End-winding
inductance because they are already
defined in the excitations
301 © 2012 ANSYS, Inc. January 12, 2015
UDO Examples

Example 6: Three-Phase Induction Motor


• Create User Defined Report (Data 4
Table)
• Select Quantities shown below
under Average & RMS Values

302 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 6: Three-Phase Induction Motor

• Transpose the table to get a column


• Uncheck Show Solution Name

303 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 6: Three-Phase Induction Motor

• Note this design has an Expression


Cache Variable Created for computing
the current in rotor bars
ExprCache(I_bar1)
1
• Create Transient Report for
ExprCache(I_bar1)
XY Plot 1 Maxwell2DDesign1
3000.00
Curve Info
ExprCache(I_bar1)
Setup1 : Transient

2000.00

1000.00
ExprCache(I_bar1)

0.00

-1000.00

-2000.00

-3000.00
0.00 25.00 50.00 75.00 100.00 125.00 150.00 175.00 200.00
Time [ms]

304 © 2012 ANSYS, Inc. January 12, 2015


2
UDO Examples

Example 6: Three-Phase Induction Motor


1
• Since this design has an anti-periodic
boundary (Bs = -Bm), there is
discontinuity in the current of the
rotor bars
• We Create User Defined Solution to
resolve this case: Currents of Cage
Induction Machines
2
• Select first probe as Express Cache
Quantity to be linked. Here it is
ExprCache(I_bar1). Second probe can
be any transient qunatity
• Specify properties, i.e, number of
poles in the machine

305 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 6: Three-Phase Induction Motor


• Create User Defined Report 3
(Rectangular Plot)
• Select Quantities below under category
Current Rotor Bars: Current(corrected)
and Current(original) 4
• Results in red are corrected
XY Plot 2 Maxwell2DDesign1
3000.00
Curve Info
Current(corrected)
CurrentRotorBars1
Current(original)
CurrentRotorBars1

2000.00

1000.00
Y1 [A]

0.00

-1000.00

-2000.00

-3000.00
0.00 25.00 50.00 75.00 100.00 125.00 150.00 175.00 200.00
Time [ms]

306 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 7: 3D IPM Motor

• Open IPM_3D.mxwl
• Analyze Setup1
• After simulation is done, Create
User Define Solution
• Select Average & RMS
Solutions item from the menu
• Select a probe (any transient
quantity e.g., Moving1.Torque)
• Enter properties values below

307 © 2012 ANSYS, Inc. January 12, 2015


UDO Examples

Example 7: 3D IPM Motor


• Create User Defined Report 1
(Data Table)
• Select Quantities below
under Average & RMS Values
and create New Report

308 © 2012 ANSYS, Inc. January 12, 2015


References

309 © 2012 ANSYS, Inc. January 12, 2015


References

1. Permanent Magnet Synchronous and Brushless DC Motor Drives, R.


Krishnan, CRC Press 2010
2. A Segmented Interior Permanent Magnet Synchronous Machine with
Wide Field-Weakening Range, Rukmi Dutta, PhD thesis , The University of
New South Wales
3. Determination of d-q Axis Parameters of Interior Permanent Magnet
Machine, P. Zhou, D. Lin, G. Wimmer, N. Lambert and Z.J. Cendes, IEEE
Transcations on Magnetics, VOL. 46, NO. 8, August 2010
4. https://www.youtube.com/channel/UCh5nHYFDBaEGtgXkIOzRjUQ

310 © 2012 ANSYS, Inc. January 12, 2015