Tutorial: Co-Simulating an IPM Motor with Flux 2D
Create an Activate model that supplies a three-phase sine current into a Flux 2D model of an Interior Permanent Magnet motor, and co-simulate the models.
The co-simulation process includes four basic steps:
- Create a Flux model. For this tutorial, a Flux model of an IPM motor is provided for you.
- Generate the Flux coupling component required for Activate to read in the Flux model data.
- Create an Activate model and include the Flux block for reading in the Flux coupling component.
- Co-simulate the models from Activate.
Files for This Tutorial
IPM_motor_Multiphysics_positionF2STA.FLU, IPM_motor_Multiphysics_position.F2STA, IPM_motor_Multiphysics_positionF2STA.scm
Overview of the Flux IPM Motor
The Flux model is a brushless, AC, Interior Permanent Magnet motor applicable for electric vehicles.
- Fixed part (stator) including yoke, slots, and windings
- Air gap
- Moveable rotor with embedded magnets
The IPM motor is driven with a three-phase sine current, running with kinematics type Multiphysics position. The simulated motor performances are applied for computing torque, phase current, speed and rotor position.
The inputs for the IPM motor are defined as multi-physical parameters and include:
- I_1: Physical quantities: μr, Bs, Br
- I_2 Electrical quantities: resistance, voltage, current
- I_3: Mechanical quantities: position, speed, electromagnetic torque
The outputs for the IPM motor are scalar I/O settings that retrieve values through the sensors, formulas (torque) and parameters (position, speed, acceleration).
The circuit of the IPM motor is configured with a current source, coil conductor, resistor and inductance.
Generating the Coupling Component in Flux
Load the Flux model and generate the coupling component with the required inputs, outputs and parameters.
Creating the Activate Model
Create a model to feed a three-phase sine current into the Flux model of the IPM motor.
Co-Simulating the Activate and Flux Models
During co-simulation, the Activate model supplies a three-phase sine current into the Flux model of the IPM motor. The simulation results show the performance of the IPM motor including torque and losses at constant speed.