0% found this document useful (0 votes)
933 views

BLDC Simulink Tutorial

This document covers the export feature of a Simcenter Motorsolve Plug-in for Simulink file in the Brushless DC Motor module.

Uploaded by

youzi Wu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
933 views

BLDC Simulink Tutorial

This document covers the export feature of a Simcenter Motorsolve Plug-in for Simulink file in the Brushless DC Motor module.

Uploaded by

youzi Wu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Simcenter Motorsolve™

BLDC
Simulink Plug-in Tutorial
Software Version 2020.2
October 2020
Unpublished work. © Siemens 2020

This document contains information that is confidential and proprietary to Mentor Graphics Corporation, Siemens
Industry Software Inc., or their affiliates (collectively, "Siemens"). The original recipient of this document may
duplicate this document in whole or in part for internal business purposes only, provided that this entire notice
appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the confidential and proprietary information.

This document is for information and instruction purposes. Siemens reserves the right to make changes in
specifications and other information contained in this publication without prior notice, and the reader should, in all
cases, consult Siemens to determine whether any changes have been made.

The terms and conditions governing the sale and licensing of Siemens products are set forth in written agreements
between Siemens and its customers.

No representation or other affirmation of fact contained in this publication shall be deemed to be a warranty or give
rise to any liability of Siemens whatsoever.

SIEMENS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY.

SIEMENS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE
DAMAGES, LOST DATA OR PROFITS, EVEN IF SUCH DAMAGES WERE FORESEEABLE, ARISING OUT OF OR
RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT, EVEN IF SIEMENS HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

LICENSE RIGHTS APPLICABLE TO THE U.S. GOVERNMENT: This document explains the capabilities of
commercial products that were developed exclusively at private expense. If the products are acquired directly or
indirectly for use by the U.S. Government, then the parties agree that the products and this document are considered
"Commercial Items" and "Commercial Computer Software" or "Computer Software Documentation," as defined in 48
C.F.R. §2.101 and 48 C.F.R. §252.227-7014(a)(1) and (a)(5), as applicable. Software and this document may only be
used under the terms and conditions of the applicable license agreement with Siemens as required by 48 C.F.R.
§12.212 and 48 C.F.R §227.7202. The U.S. Government will only have the rights set forth in the End User License
Agreement, which supersedes any conflicting terms or conditions in any government order document, except for
provisions which are contrary to applicable mandatory federal laws.

TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of Siemens or
other parties. No one is permitted to use these Marks without the prior written consent of Siemens or the owner of the
Marks, as applicable. The use herein of third party Marks is not an attempt to indicate Siemens as a source of a
product, but is intended to indicate a product from, or associated with, a particular third party. A list of Siemens'
trademarks may be viewed at: www.plm.automation.siemens.com/global/en/legal/trademarks.html and
mentor.com/trademarks.

The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds,
owner of the mark on a world-wide basis.

Support Center: support.sw.siemens.com


Send Feedback on Documentation: support.sw.siemens.com/doc_feedback_form
Introduction
This document covers the export feature of a Simcenter Motorsolve Plug-in for Simulink file in the
Brushless DC Motor module. It will provide the steps to design a Brushless DC motor in
Simcenter Motorsolve and a step by step guide on how to export and simulate different models of
this design in Simulink. These models include the linearized, nonlinear and Simscape models
which vary in accuracy. A section on the thermal model will also be included.

The outline of this document will follow these following steps:

Steps for designing the brushless DC motor in Simcenter Motorsolve


 Step #1 – Specifying the model’s general characteristics
 Step #2 – Specifying the rotor’s characteristics
 Step #3 – Specifying the stator’s characteristics
 Step #4 – Specifying the stator’s windings’ characteristics
 Step #5 – Specifying the stator’s end windings’ characteristics
 Step #6 – Specifying the rotor and stator magnets’ material

BLDC Simulink Plug-in Tutorial, V2020.2 1


October 2020
Generating one of the following files from Simcenter Motorsolve
 Simulink plug-in for Simcenter Motorsolve *.mdl file format
 Linearized model
 Thermal model
 Nonlinear model
 Simulink plug-in for Simcenter Motorsolve *.rsm file format
 Linearized model
 Thermal model
 Simscape *.mdl file format

Simulating one of the following files in Simulink


 Simulation of Simulink plug-in for Simcenter Motorsolve *.mdl file format
 Simulation of Simulink plug-in for Simcenter Motorsolve *.rsm file format
 Simulation of Simscape *.mdl file format

Results
 Models’ accuracy
 Simscape model (low accuracy)
 Linearized model (medium accuracy)
 Nonlinear model (high accuracy)
 Thermal model
 Steady-state operating temperature
 Ambient temperature

2 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Designing the Brushless DC motor in Simcenter
Motorsolve
Step #1 – Specifying the model’s general characteristics
1. From Motor Explorer’s Designs page, select General Settings. 
The Input panel for General Settings is active, with some 
parameters set at their default values. 
2. In the Input panel, make the following modifications: 
Specification 
 Supply Voltage:          300 
 Rated Current:           100 
Global 
 Outer diameter:          269 
 (Click OK for Simcenter Motorsolve ‘Outer diameter’ 
Change prompt, if required) 
 Air gap thickness:    0.73025 
 Stack height:               84 
Rotor 
 Rotor type:   IPM with variable orientation 
magnets 
(selected from drop‐down list) 

Stator 
   Stator type:     General round 
(selected from drop‐down list) 

 Number of slots:            48 

Note  All other parameters represent either the 
default value or a re‐  calculated value based on 
the modifications 
3. From Motor Explorer’s toolbar, click  . 
The Save Model As dialog appears. 
4. Browse to a known location. 
5. In the File Name box, type BLDC_Simulink_export_tutorial. 
Note  When naming the model, the file name 
extension is automatically added (e.g. filename.moto). Do 
not change this extension. 
6. Click Save.

BLDC Simulink Plug-in Tutorial, V2020.2 3


October 2020
Step #2 – Specifying the rotor’s characteristics
1. From Motor Explorer’s Designs page, select Rotor (IPM with 
variable orientation magnets). 

The Input panel for Rotor is active, with some parameters 
set at their default values. 

2. In the Input panel, make the following modifications: 

General 
 Rotor overhang:    ‐0.45 

Diameters 
 Inner diameter:    111 

 Outer diameter:          160.4695 

Core 
 Bridge thickness:   1.485 

 Bridge width:      03.5189659 

 Gap taper:     0 

 Post width:     0 

 Web taper:     0 

 Web thickness:    13.15 

Magnet 
 Magnet orientation  17.5 
 
 Magnet thickness:   6.5 

 Magnet top gap width:   0 

 Magnet width:    18.9 

Note     All other parameters represent either the default 
value or a re‐calculated value based on the modifications. 
Note the green check mark  that indicates that a 
parameter has been modified by the user. 

3. From Motor Explorer’s toolbar, click  . 

The BLDC_Simulink_export_tutorial.moto file is updated with 
the modifications you’ve made to the rotor. 

4 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Step #3 – Specifying the stator’s characteristics
1. From Motor Explorer’s Designs page, select Stator 
(General Round) 

The Input panel for Stator is active, with most 
parameters set at their default values. 

2. In the Input panel, make the following modifications: 

Diameters 
 Inner diameter:       162 

Teeth 
 Slot bottom radius:    2.902 

 Slot depth:        33.5 

 Slot opening width:      1.93 

 Slot top width:      3.15 

 Tooth tang angle:         15 

 Tooth tip thickness:      1.02 

Note  All other parameters represent either the 
default value or a re‐calculated value based  on the 
modifications. Note the green check mark  that 
indicates that a parameter has been modified by the 
user. 

3. From Motor Explorer’s toolbar, click  . 
 
The BLDC_Simulink_export_tutorial.moto file is updated 
with the modifications you’ve made to the stator. 

BLDC Simulink Plug-in Tutorial, V2020.2 5


October 2020
Step #4 – Specifying the stator windings’ characteristics
1. From Motor Explorer’s Designs page, select Stator 
Windings [a subset of Stator (General Round)]. 

The Input panel for Stator Windings is active, with most 
parameters set at their default values. 

2. In the Input panel, make the following modifications: 

Drive 
 Current hysteresis:    2 

Coil Cross Section 
 Slot liner thickness:    0 

 Coil separator thickness:    0 

 Slot wedge thickness:             0.1 

Wire 
 Wire size method:      AWG number 

 AWG number:                19 

 Number of strands in hand:  13 

Layout 
 Coil span:      5 

 Number of layers:    1 

 Automatic layout:    96.6% 
           (1 ‐7 13 ‐19 25 ‐31 37 ‐43) 

   Number of turns:     9 

Note    All other parameters represent either the 
default value or a re‐calculated value based on the 
modifications 

 
3. From Motor Explorer’s toolbar, click  . 

The BLDC_Simulink_export_tutorial.moto file is updated 
with the modifications you’ve made to the stator 
windings. 

6 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Step #5 – Specifying the stator end windings’ characteristics
1. From Motor Explorer’s Designs page, select Stator End 
Windings [a subset of Stator (General Round)]. 

The Input panel for Stator End Windings is active, with 
most parameters set at their default values. 

2. In the Input panel, make the following modifications: 

End Effects 
 Gap height:      0 

 Inner inset depth:    0.2 

 Outer diameter:              240 

 Height:                 35 

Note     All other parameters represent either the default 
value or a re‐calculated value based on the modifications 

3. From Motor Explorer’s toolbar, click  . 
 
The BLDC_Simulink_export_tutorial.moto file is updated 
with the modifications you’ve made to the stator end 
windings. 

Step #6 – Specifying the rotor and stator magnets’ material


1. From Motor Explorer’s Designs page, select Materials. 

The Input panel for Materials is active, with most 
parameters (i.e. assigned materials) set at their default 
values. 

2. In the Input panel, select the following options: 

Rotor Materials 
 Rotor core material:       M‐19 26 Ga 

 Rotor magnet material: 
       Neodymium Iron Boron: 38/15 

Stator Materials 
 Stator back iron material:   
              M‐19 26 Ga 

 From Motor Explorer’s toolbar, click  . 

3. The BLDC_Simulink_export_tutorial.moto file is updated 
with the modifications you’ve made to the materials. 
 
The design is now complete. Please note that for the 
purposes of this tutorial, we have elected to keep the 
default name (i.e. Prototype Design 1). 

BLDC Simulink Plug-in Tutorial, V2020.2 7


October 2020
Exporting the model to Simulink
Simcenter Motorsolve plug-in for Simulink (*.mdl extension file
format)
1. From Motor Explorer’s Results page, under “Analysis Charts”, select PWM analysis.

2. In the Input panel for PWM analysis there is no need to select Prototype Design 1 from the
Designs drop-down list box as, by default, it has already been selected by Simcenter Motorsolve.
Under Resolution & Accuracy, select the “Yes” option for Include iron loss. This will perform and
extra FEA solution to estimate the iron losses in the model. (Note: This step is optional)

3. To export the thermal model, set Include thermal to “Yes” under Result Export Options.

8 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
4. To export the nonlinear model, make the following modifications:
 
Resolution & Accuracy 
 
 Model type:                  Nonlinear 

 FEA currents percentages:   
      5, 11, 25, 50, 100, 150, 200 

 FEA advance angles:   
                   0, 360, 30 

 Speed/Accuracy tradeoff:                    3 

5. Click on the export button.

6. Select the Simcenter Motorsolve Plug-in for Simulink (*.mdl) option from the dropdown. Browse to
the desired location and click Save.

(Note: Simulink does not accept *.mdl filenames with dashes, spaces or commas but
allows underscores).

BLDC Simulink Plug-in Tutorial, V2020.2 9


October 2020
Simcenter Motorsolve plug-in for Simulink (*.rsm extension file
format)
1. From Motor Explorer’s Results page, under “Analysis Charts”, select PWM analysis.

2. In the Input panel for PWM analysis there is no need to select Prototype Design 1 from the
Designs drop-down list box as, by default, it has already been selected by Simcenter Motorsolve.

Under Resolution & Accuracy, select the “Yes” option for Include iron loss. This will perform and
extra FEA solution to estimate the iron losses in the model. (Note: This step is optional)

3. To export the thermal model, set Include thermal to “Yes” under Result Export Options.

10 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
4. Click on the export button.

5. Select the Simcenter Motorsolve Plug-in for Simulink (*.rsm) option from the dropdown. Browse to
the desired location and click Save.

BLDC Simulink Plug-in Tutorial, V2020.2 11


October 2020
Simscape (*.mdl extension file format)
1. From Motor Explorer’s Results page, under “Analysis Charts”, select Lumped parameters.

2. In the Input panel for Lumped parameters there is no need to select Prototype Design 1 from
the Designs drop-down list box as, by default, it has already been selected by Simcenter
Motorsolve.
3. Click on the export button.
4. Select the Simscape (*.mdl) option from the drop-down. Browse to the desired location and
click Save.

(Note: Simulink does not accept *.mdl filenames with dashes, spaces or commas but
allows underscores).

12 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Simulating the exported model in Simulink
Simcenter Motorsolve plug-in for Simulink (*.mdl extension file
format)
1. Browse and locate the Simulink model file. It should look like this:

2. Double-click to open the file.

3. Open MATLAB. Make sure that the correct version of “Simcenter Motorsolve Plug-in for Simulink”
is installed and its folder directory is added to the path. To check this, click Home →Set path. If
the directory is absent, click on Add Folder and browse to the plug-in’s directory. If there is no
directory present, download the plug-in from Infolytica’s website. (Note: If you are running the 64-
bit version of MATLAB then you will need “Simcenter Motorsolve Plug-in for Simulink (64-bit)”)

BLDC Simulink Plug-in Tutorial, V2020.2 13


October 2020
4. Double-click on the plug-in. Change the Type to Load Driven and click OK. Set the Inertia to 0.5.

14 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
5. If you already have a three-phase drive circuit, copy and paste the plug-in and connect the input
and output pins accordingly. If not, use the circuit attached in the tutorial files:

For thermal models, add a temperature value as an input to the plug-in:

The Simulink model of this controller, which generates the desired voltages in d-q space is shown
in this figure. A simple PI control scheme is used to control the motor dynamics through a velocity
and current feedback loops.
6. Set the simulation time to 0.5 second and press run.

BLDC Simulink Plug-in Tutorial, V2020.2 15


October 2020
Simcenter Motorsolve plug-in for Simulink (*.rsm extension file
format)
1. The exported file should look like this:

2. Open MATLAB. Make sure that the correct version of “Simcenter Motorsolve Plug-in for Simulink”
is installed and its folder directory is added to the path. To check this, click Home →Set path. If
the directory is absent, click on Add Folder and browse to the plug-in’s directory. If there is no
directory present, download the plug-in from Infolytica’s website. (Note: If you are running the 64-
bit version of MATLAB then you will need “Simcenter Motorsolve Plug-in for Simulink (64-bit)”)

3. Create a new Simulink Model by clicking on Home →New→Simulink Model. Then, click on Library
Browser .
4. Under Libraries, select Infolytica: Simcenter Motorsolve then right click on the plug-in. Select Add
block to a new model to open the plug-in in a new Simulink Model.

16 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
5. Double click on the plug-in to open the Function Block Parameters. Insert the path to the exported
*.rsm file under Model Filename and select Load driven as the type. Set the Inertia to 0.5.

BLDC Simulink Plug-in Tutorial, V2020.2 17


October 2020
6. If you already have a three-phase drive circuit, cut and paste the plug-in and connect the input
and output pins accordingly. If not, use the circuit attached in the tutorial files:

For thermal models, add a temperature value as an input to the plug-in:

The Simulink model of this controller, which generates the desired voltages in d-q space is shown
in this figure. A simple PI control scheme is used to control the motor dynamics through a velocity
and current feedback loops.

7. Set the simulation time to 0.5 second and press run.

18 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Simscape (*.mdl extension file format)
1. Browse and locate the Simulink model file. It should look like this:

2. Double-click to open the file.

3. Double-click on the model to open the Block Parameters. Change the inertia to 0.5.

BLDC Simulink Plug-in Tutorial, V2020.2 19


October 2020
(Note: In this model, the back EMF is not a pure sinusoidal waveform. Therefore, the flux
linkage corresponding to the fundamental harmonic is used as an input to the Simscape
model).

4. If you already have a three-phase drive circuit, copy and paste the plug-in and connect the input
and output pins accordingly. If not, use the circuit attached in the tutorial files:

The Simulink model of this controller, which generates the desired voltages in d-q space is shown
in this figure. A simple PI control scheme is used to control the motor dynamics through a velocity
and current feedback loops.

5. Set the simulation time to 0.5 second and press run.

20 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Results
Simscape model (lowest accuracy)
Voltage  Current 

   
   
Speed  Torque 

   
 

BLDC Simulink Plug-in Tutorial, V2020.2 21


October 2020
Linearized model (medium accuracy)
Voltage  Current 

   
   
Speed  Torque 

   
   

22 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Nonlinear model (highest accuracy)
Voltage  Current 

   
   
Speed  Torque 

   
   

The graphs above display the differences in accuracy between the three models. The Simscape
model is the least accurate seen from the low torque ripple. This is because this model does not
take into consideration the effect of the slots. On the other hand, the Simscape model is much
faster to generate and simulate from Simcenter Motorsolve and Simulink. In this example, the
simulation of the Simscape model is 2.5 times faster (2s versus 5s) than the linearized model
which in turn is 1.5 times faster (5s versus 7s) than the nonlinear model.

This trade-off between speed and accuracy should be accounted for when using the BLDC export
feature.

BLDC Simulink Plug-in Tutorial, V2020.2 23


October 2020
Thermal model (At 20 °C)
Voltage  Current 

   
   
Speed  Torque 

   
   
Total Loss 

 
 

24 BLDC Simulink Plug-in Tutorial, V2020.2


October 2020
Thermal model (At 127 °C)
Voltage  Current 

   
   
Speed  Torque 

   
   
Total Loss 

 
 

BLDC Simulink Plug-in Tutorial, V2020.2 25


October 2020

You might also like