Professional Documents
Culture Documents
FLUX2D76 FLUX2D To Simulink Technology Technical Paper
FLUX2D76 FLUX2D To Simulink Technology Technical Paper
FLUX2D
FLUX2D software Equation circuit coupling PREFLU CAOBIBS software Tutorials of FLUX2D
: : : : :
COPYRIGHT CNRS/INPG COPYRIGHT EDF/CEDRAT/CNRS/INPG COPYRIGHT CEDRAT/CNRS/INPG COPYRIGHT ECL/CEDRAT/CNRS/INPG COPYRIGHT CEDRAT
This tutorial has been printed the 27 September 2002 Rf.: K205-O-760-EN-09/02
CEDRAT 10 Chemin de Pr Carr - Zirst 38246 MEYLAN Cedex FRANCE Phone: +33 (0)4 76 90 50 45 Fax: +33 (0)4 76 90 16 09 Email: cedrat@cedrat.com Web: http://www.cedrat.com
FLUX2D7.60
CONVENTIONS USED
CONVENTIONS USED
To make this tutorial easier to read, we use the following typeface conventions:
All comments are written in the same way as this sentence. All dialog text between the user and FLUX2D is written in courier font: Name of the region to be created: magnet Colour of this region: <M>AGENTA Select a surface or a menu item: <Q>uit [q]uit
Below are presented the conventions used for the dialog between the user and FLUX2D: Italic text Bold text magnet [q]uit <B>old text <M>AGENTA <COILR>
Messages or questions displayed on the screen by FLUX2D. User input to FLUX2D, such as the coordinates of a point. The character symbolizes the Return/Enter key. You only have to enter enough of the response to remove any ambiguity between the response you want and other valid ones. In which case enter the character shown in square brackets [ ]. FLUX2D menu input. Make a selection by clicking on the menu item with the mouse or, if there is no ambiguity, by entering the first character of the word (shown in angled brackets < >). FLUX2D graphical input, such as selecting a line or a point.
The reply is by default. To enter a default response, simply press the Return/Enter key.
- REMARK The files corresponding to different cases studied in this tutorial are available in the folder:
..\doc_examples\examples\tutorial\2D\Simulink
The correspondent applications are ready to be solved. This allows you to adapt this tutorial to your needs. If you do not know FLUX2D yet, we advise you to run through this entire tutorial and to refer, if necessary to the given cases. If you already know FLUX2D, we advise you to redo only the Parameterization, Solving and Analysis sections, in order to discover the new possibilities of FLUX2D.
FLUX2D7.60
TABLE OF CONTENTS
TABLE OF CONTENTS
1. Materials ......................................................................................................................3 2. Definition of the electrical circuit ..................................................................................5 3. Physical properties ......................................................................................................7
3.1 3.2 3.3 3.4 General information .................................................................................................... 7 Materials ..................................................................................................................... 7 Boundary conditions ................................................................................................... 8 Electrical circuit........................................................................................................... 8
4.2
6.2
With Flux2d............................................................................................................... 21
6.2.1 6.2.2 6.2.3
PAGE A
TABLE OF CONTENTS
FLUX2D7.60
PART B: Square wave motor - No load startup with electromechanical coulping 25 7. Physical properties.....................................................................................................27 8. Simulink model and solving .......................................................................................29 9. Results .......................................................................................................................31
9.1 With Simulink ............................................................................................................31
9.1.1 9.1.2 Mechanical quantities ...............................................................................................31 Electrical quantities...................................................................................................32 Equiflux lines ............................................................................................................33 Mechanical quantities ...............................................................................................34 Electrical quantities...................................................................................................35
9.2
PART C: Square wave motor - Servo operation with electromechanical coupling 37 10. Physical properties.....................................................................................................39 11. Simulink model and solving .......................................................................................41 12. Results .......................................................................................................................43
12.1 With Simulink ............................................................................................................43
12.1.1 12.1.2 12.2.1 12.2.2 12.2.3 Mechanical quantities ...............................................................................................43 Electrical quantities...................................................................................................44 Flux density distribution ............................................................................................45 Torque ......................................................................................................................45 Currents....................................................................................................................46
PAGE B
FLUX2D7.60
PAGE 1
FLUX2D7.60
PAGE 2
FLUX2D7.60
1. Materials
The materials will be the same in all this technical paper. The magnet is modelled by a linear material, whereas the steel is modelled by a non-linear material.
Permeability
PAGE 3
FLUX2D7.60
PAGE 4
FLUX2D7.60
PART A: Square Wave Motor Torque Ripples Definition of the electrical circuit
The motor is supplied with a 3-phase bridge inverter where the free wheeling diodes have been neglected. The inverter switching scheme is dependent on the rotor position. The switches are modelled by resistances with a very low value to model on-state and very large value to model offstate. To model the drop voltage on the switches, a voltage source has been added to every resistance. Simulink will control the value of the resistances depending on the position of the rotor. In the electrical circuit will only be described the components: the values of the resistances will be set to 1 as a reference value.
PAGE 5
PART A: Square Wave Motor Torque Ripples Definition of the electrical circuit
FLUX2D7.60
Name of the component VSOURCE V1 V2 V3 V4 V5 V6 PA MA PB MC Resis34 Resis35 Resis36 Resis37 Resis38 Resis39 Induc15 Induc16 Induc17 Resis18
Comment Voltage source Voltage source Voltage source Voltage source Voltage source Voltage source Voltage source Coil Coil Coil Coil Resistor Resistor Resistor Resistor Resistor Resistor Inductance Inductance Inductance Resistor
Model Constant Constant Constant Constant Constant Constant Constant Total value Total value Total value Total value Constant Constant Constant Constant Constant Constant Constant Constant Constant Constant
Value 6V 0.8 V 0.8 V 0.8 V 0.8 V 0.8 V 0.8 V Number of turns: 10 Resistance: 0.017625 Ohm Number of turns: 10 Resistance: 0.017625 Ohm Number of turns: 20 Resistance: 0.03525 Ohm Number of turns: 20 Resistance: 0.03525 Ohm 1 Ohm 1 Ohm 1 Ohm 1 Ohm 1 Ohm 1 Ohm 7.75 H 7.75 H 7.75 H 100.000 Ohm
PAGE 6
FLUX2D7.60
3. Physical properties
Complete this part in FLUX2D. Use the brushless machine geometry drawn in the first part.
3.1
General information
In the following, the name of this file is TORQUE_RIPPLE. The problem has a constant cross section (plane problem) with a depth of 50.308 mm. It is solved with the Transient Magnetic application.
Note : Flux2d Simulink coupling is available only for transient magnetic computations so far.
3.2
Materials
Material VACUUM VACUUM VACUUM VACUUM Rotational air gap VACUUM VACUUM VACUUM STEEL STEEL MAGNET MAGNET Property Source Source Source Source Angular velocity Source Source Source Source Source Direction of magnetisation Source Model External circuit External circuit External circuit External circuit Constant No source No source No source No source No source Radial + No source (0,0) 2000 rpm 2 Value Nb of pair of poles
There are only two materials that should be assigned to regions as follows:
Name of the region PA MA PB MC AIRGAP WEDGE AIR SHAFT ROTOR STATOR MAGNET MAGNET
Table 3: Materials
PAGE 7
FLUX2D7.60
3.3
Boundary conditions
FLUX2D automatically assigns the right boundary conditions taking into account the number of pole pairs of the motors and the number of displayed poles.
? 0 BREAK Quit Zoom Reset Move 1 Dirichlet 2 Float 3 Cyclic 4 Anticyclic 5 Translation 6 Periodic 7 Cancel
3.4
Electrical circuit
The different electrical components are described in the second chapter. The Simulink model is described in the following chapter.
PAGE 8
FLUX2D7.60
4.1
In the following is presented the Simulink model, with the definition of every block.
4.1.1
Whole model
PAGE 9
FLUX2D7.60
The model includes: a Coupling with Flux2d block: this block calls FLUX2D during the computation (see paragraph 4.2.2) the command (on the left part of the model): this part commands the value of the resistances depending on the position of the rotor. (see paragraph 4.2.3) the outputs to be displayed (see paragraph 4.2.4)
4.1.2
Switching scheme
The switches states depend on the rotor position, expressed in electrical angle. The following table shows the moments where the switches are on, assuming one electrical period corresponds to 180 mechanical degrees. Note: According to the model we used, an on switch is equivalent to a resistance set to a low value. In the following, the on state will be represented by a resistance of 1e-4 Ohm, the off state by a resistance of 1e+6 Ohm.
Name of the resistance R1 R2 R3 R4 R5 R6 On state minimum angle 15 105 75 164 135 45 On state maximum angle 75 165 135 45 15 105
PAGE 10
FLUX2D7.60
4.2
4.2.1
This block enables a direct co-simulation with both Flux2D and Matlab Simulink. After installing the files as explained in the users guide, this block is available in the Simulink Library Browser, in the folder flux_link. It is defined by: the TRA file that will be solved: give the name of the TRA file without the extension .TRA TORQUE_RIPPLE Flux2D inputs: the resistances R1 to R6 representing the switches should be defined as inputs to Flux2D. The syntax to use is described in the users guide. [Resistance:resis37;Resistance:resis34;Resistance:resis38;Resista nce:resis35;Resistance:resis39;Resistance:resis36] Note: The components names correspond to the name given to the components in page 4. Do not forget to check that it corresponds to your circuit. Flux2D outputs: the mechanical values are displayed (torque, angular velocity and position) as well as some electrical values (current in phase 1 and 2 and in the voltage source) [TORQUE;OMEGA;TETA;CURRENT:induc15;CURRENT:induc17;CURRENT:vsour ce] the time step: the computation has 48 time steps over an electrical period (180 degrees). Then each time step represent a rotation of 180 / 45 = 3.75 degrees. Assuming a constant speed of 2000 rpm, the time step is then 3.75 / ( 2000 * 6 ) = 0.3125 ms. 0.3125e-3 the initial conditions: there is no initial conditions to set.
PAGE 11
FLUX2D7.60
4.2.2
The command
This part controls the electrical circuit of Flux2D. It will control the value of the resistances depending on the position of the rotor.
All six resistances are on in a certain range of values of the rotor position. The Min and Max values are the trigger on and trigger off times respectively. Assuming that there are 2 pole pairs, one mechanical period corresponds to 180 electrical degrees. That is why all the Min and Max values should be in the range [0; 180]. The Max values are then not necessary greater than the Min values. Two cases can be distinguished then: when the Max value is greater than the Min value (for R1, R2, R3 and R6), and when the Max value is lower than the Min value (for R4 and R5).
PAGE 12
FLUX2D7.60
4.2.2.1
4.2.2.2
PAGE 13
FLUX2D7.60
4.2.3
Outputs
Figure 6: Outputs
As six outputs have been defined in the Coupling with Flux2d block, 2 scopes with 3 graphs each can be used (one for the mechanical quantities, one for the electrical quantities). The output position of the rotor is expressed in mechanical degrees. As the resistances are controlled with electrical angles, a block should be added to convert mechanical angles to electrical angles : this is the block called modulo (block Math function to be find in Simulink - Math in the Simulink Library Browser).
PAGE 14
FLUX2D7.60
5. Solve
Note: There is no need to open Flux2d to solve the problem. The simulation can be handled directly in Simulink.
The computation time step for Flux2d has been defined in the Coupling with Flux2d block. Before starting the solving, the computation range should be defined (start and stop times). In this case, as explained above, one electrical period will be simulated, representing 15 ms.
Note: Do not forget to choose the same time step for Simulink computation as done for Flux2d.
PAGE 15
FLUX2D7.60
PAGE 16
FLUX2D7.60
6. Results
Results can be displayed both with Simulink and with Flux2D. With Simulink, only the values defined as outputs will be displayed. With Flux2D, all the quantities usually reachable with Postpro_2D can be displayed and computed.
6.1
6.1.1
With Simulink
Resistances values
PAGE 17
FLUX2D7.60
PAGE 18
FLUX2D7.60
6.1.2
Mechanical quantities
PAGE 19
FLUX2D7.60
6.1.3
Electrical quantities
The first computed time step is for 0.1 ns. This solution corresponds then to a static result. It explains why the first value of the electrical quantities is out of the range of the other ones. Let us go now in Flux2d postprocessor to deeper analyse this problem.
PAGE 20
FLUX2D7.60
6.2
6.2.1
With Flux2d
Equiflux lines
PAGE 21
FLUX2D7.60
6.2.2
The Flux density is computed on a path (arc of circle) located in the middle of the air gap.
PAGE 22
FLUX2D7.60
PAGE 23
FLUX2D7.60
6.2.3
Currents
PAGE 24
FLUX2D7.60
PAGE 25
FLUX2D7.60
PAGE 26
FLUX2D7.60
PART B: Square wave motor No load startup with electromechanical coupling Physical properties
7. Physical properties
The constant speed problem being already defined, the physical properties can be easily modified to simulate the no load startup of the motor. The only information that changes is the definition of the air gap properties. Instead of being defined as a rotational air gap with a constant angular velocity, it is defined as a rotational air gap with constant mechanical values, defined as below:
Property Moment of inertia of the rotor Friction coefficient Drag torque Initial angular velocity Spring constant Initial streching / compression of the spring / position at rest Value 3.8675e-5 0.005 0 0 0 0 Unit kg.m N.m.s N.m rpm N.m degrees
All the other properties (materials, boundary conditions and electrical circuit) remain identical. Save this file as No_Load_Startup.
PAGE 27
PART B: Square wave motor No load startup with electromechanical coupling Physical properties
FLUX2D7.60
PAGE 28
FLUX2D7.60
PART B: Square wave motor No load startup with electromechanical coupling Simulink model and solving
As the supply and the command remain identical, the Simulink model remains also the same. Then, it is just needed to Save as the Simulink model with another name, and give the new name of the TRA file to the Coupling with Flux2d block.
This time, the problem will be solved on 3 mechanical periods, i.e. 1.5 electrical period (45 ms). The chosen time step is 0.5 ms.
PAGE 29
PART B: Square wave motor No load startup with electromechanical coupling Simulink model and solving
FLUX2D7.60
PAGE 30
FLUX2D7.60
PART B: Square wave motor No load startup with electromechanical coupling Results
9. Results
9.1
9.1.1
With Simulink
Mechanical quantities
PAGE 31
PART B: Square wave motor No load startup with electromechanical coupling Results
FLUX2D7.60
9.1.2
Electrical quantities
PAGE 32
FLUX2D7.60
PART B: Square wave motor No load startup with electromechanical coupling Results
9.2
9.2.1
With Flux2d
Equiflux lines
PAGE 33
PART B: Square wave motor No load startup with electromechanical coupling Results
FLUX2D7.60
9.2.2
Mechanical quantities
As it could have been expected, the no load motor torque has a steady state mean value equal to zero. This torque is different from the magnetic torque, represented in Simulink. We have indeed :
T = Tm Tr f&
where T is the motor torque Tm is the magnetic torque Tr is the drag torque (set here to zero) f is the friction coefficient & is the angular velocity
PAGE 34
FLUX2D7.60
PART B: Square wave motor No load startup with electromechanical coupling Results
9.2.3
Electrical quantities
PAGE 35
PART B: Square wave motor No load startup with electromechanical coupling Results
FLUX2D7.60
PAGE 36
FLUX2D7.60
PAGE 37
FLUX2D7.60
PAGE 38
FLUX2D7.60
PART C: Square wave motor Servo operation with electromechanical coupling Physical properties
The no load startup problem being already defined, the physical properties can be easily modified to simulate the servo operation. The only information that changes is the definition of the air gap properties. It is still a rotational airgap with constant mechanical values, but you have to add a drag torque.
Property Moment of inertia of the rotor Friction coefficient Drag torque Initial angular velocity Spring constant Initial streching / compression of the spring / position at rest Value 3.8675e-5 0.005 0.3 0 0 0 Unit kg.m N.m.s N.m rpm N.m degrees
All the other properties (materials, boundary conditions and electrical circuit) remain identical. Save this file as Servo_operation.
PAGE 39
PART C: Square wave motor Servo operation with electromechanical coupling Physical properties
FLUX2D7.60
PAGE 40
FLUX2D7.60
PART C: Square wave motor Servo operation with electromechanical coupling Simulink model and solving
As the supply and the command remain identical, the Simulink model remains also the same. Then, it is just needed to Save as the Simulink model with another name, and give the new name of the TRA file to the Coupling with Flux2d block.
This time, the problem will be solved on 3 mechanical periods, i.e. 1.5 electrical period (45 ms). The chosen time step is 0.5 ms.
PAGE 41
PART C: Square wave motor Servo operation with electromechanical coupling Simulink model and solving
FLUX2D7.60
PAGE 42
FLUX2D7.60
PART C: Square wave motor Servo operation with electromechanical coupling Results
12. Results
12.1
12.1.1
With Simulink
Mechanical quantities
PAGE 43
PART C: Square wave motor Servo operation with electromechanical coupling Results
FLUX2D7.60
12.1.2
Electrical quantities
PAGE 44
FLUX2D7.60
PART C: Square wave motor Servo operation with electromechanical coupling Results
12.2
12.2.1
With Flux2d
Flux density distribution
12.2.2
Torque
PAGE 45
PART C: Square wave motor Servo operation with electromechanical coupling Results
FLUX2D7.60
12.2.3
Currents
PAGE 46