New Build

22Oct2023


25Jul2022


01Mar2022


26Jun2021


28Mar2021 Test Build


30Nov2020 Test Build


12Nov2020 Test Build


22Jul2020 Test Build


21Apr2019 Release

See Release Notes for differences with 06Oct2018. The most significant change is improvements to the thermal materials library and the magnetic materials library in the area of PM materials.

06Oct2018 Test Build

Since the "sliding band" rotor motion model was introduced in the 25Feb2018 build, FEMM has the potential to be used for transient motor simulations. Development work is presently focusing on running FEMM in Simulink, using Simscape Electrical to model external equipment connected to the machine. Versus the 25Feb2018 release build, the 06Oct2018 test build implements some fixes that were found to be necessary to enable these transient simulations:


Transient Simulation

The "incremental permeability" solution type in combination with the "sliding band" rotor motion model essentially implements the hooks necessary to do transient problems using the methods described in:

E. Lange, F. Henrotte, and K. Hameyer, "An Efficient Field-Circuit Coupling Based on a Temporary Linearization of FE Electrical Machine Models", IEEE Transactions on Magnetics, 45(3):1258-1261, Mar 2009.

First, a nonlinear problem is solved at a particular nonlinear operating point (i.e. a particular set of instantaneous currents at a particular rotor orientation) Then, a linear, incremental problem based on the incremental permeabilities gleaned from the nonlinear operating point is solved for each phase where the phase of interest has a current of 1A and all other excitation is turned off. For each solution, the self inductance and the mutual inductances with all other phases are computed to generate one row of the incremental inductance matrix. Then, the "air gap interaction torque" with the full nonlinear solution is computed to determine the back EMF voltage seen by the phase of interest. The development build contains a fixed "air gap interaction torque" integral that evaluates this interaction torque in such a way that smooth results are obtained as the rotor moves, an attribute necessary for good behavior in a transient simulation.

Looking at it another way, linearizing for small changes in current, \(i\), a very general equation that describes most rotating machines is: \[ L_{inc} \frac{di}{dt} + \omega \frac{d \psi}{d\theta} + R i = v \] where \(L_{inc}\) is the incremental inductance matrix gleaned by evaluation of inductance from the incremental permeability solutions; \(\frac{d \psi}{d\theta}\) is the change in flux linkage with respect to the change in rotor orientation gleaned by the evaluation of interaction force from the incremental permeability solutions; \(\theta\) represents the rotor orientation; and \(\omega\) is the change in \(\theta\) with respect to time. Matrix \(R\) is the phase resistance matrix (which is not necessarily evaluated by FEA and should contain resistance contributions from the end turns), and \(v\) is an externally applied voltage vector.

It is possible to include a direct link to FEMM in various transient simulation engines, by wrapping the above generalized model in in the "right way".

Example Problem

For a simple example, the machine considered on the RotorMotion page (pictured below as Figure 1) can be used. The model of the machine on that page is antunes.fem. The machine is a permanent magnet brushless AC (BLAC) machine with a nominal operating point of 2hp at 2000RPM.

text
Figure 1: Brushless AC Motor considered on the RotorMotion page.

Perhaps the simplest transient simulation that might be performed is to model the machine running as a generator driving a balanced, three-phase load. For sanity-checking purposes, the antunes.fem machine lends itself to a pretty simple per-phase phasor model:
\[ \left( j p \omega_m L + R+R_{load} \right) i + p \omega_m \phi_m = 0 \] Parameters for the phasor model are listed in Table 1. The phase inductance was obtained by measuring the flux linkage of the B phase of the machine in the case where the coercivity of the permanent magnets was set to zero and the phase currents were set to A=-0.5A; B=1A; C=-0.5A. The resistance is the DC resistance measured for the B phase in this same simulation with a 1.314 multiplier on resistance used to account for the end turn resistance. The PM flux linkage was obtained by computing the amplitude of the fundamental component of flux linkage from the simulations shown on the RotorMotion page.

Parameter Symbol Value
Phase Inductance \(L\) 4.4mH
Phase Resistance \(R\) 0.3872\(\Omega\)
Load Resistance \(R_{load}\) 6.6\(\Omega\)
PM Flux Linkage \(\phi_m\) 0.115695Wb
Pole Pairs p 4
Mechanical Speed \(\omega_m\) 209.4 rad/s (2kRPM)
Table 1: Parameters in phasor model.

The analytical model can be used for comparison to a Simulink model that directly calls FEMM. A Simulink model of the generator at 2000RPM driving a balanced resistive load is shown in Figure 2. The figure shows a FEMM model of the machine, but the analytical model can be substituted into this block for comparison.
text
Figure 2: Simulink model of PM generator driving a balanced, three-phase load.

A Level 1 Matlab S-function lives inside the FEMM Motor Model block to marshal interactions with FEMM. A Mux and a Demux separate the inputs and outputs of the S-function for easier integration into the bigger Simulink model. The S-function and Mux/Demux are shown in Figure 3.
text
Figure 3: S-function block used for the FEMM machine model.

In this particular implementation, the S-function has no continuous or discrete states. The S-function is used to build differential equations in terms of phase currents that are subsequently solved by Simulink. In the S-function, a call to openfemm appears in the S-function's mdlInitializeSizes that is called on start-up. During the simulation, Simulink repeatedly calls the S-function's mdlOutputs function. Here, a full nonlinear FEMM analysis determines the operating point for this iteration. Three linear incremental permeability analyses based on this nonlinear operating point determine the incremental inductance matrix and back-EMF for each phase. The function then returns \(\frac{di}{dt}\) for this present iteration, which is integrated by Simulink to get phase current. At the end of the simulation, FEMM is closed with a call to closefemm in the S-function's mdlTerminate function. As shown in Figure 4, simulations of the FEMM and analytical models give similar results. However, the FEMM model correctly resolves the on-load torque ripple due to the harmonics of the back EMF and cogging torque.

FEMM Machine Model
Analytical Machine Model
Figure 4: Simulation results for FEMM and analytical models of a BLAC machine.

The same S-function used to model the machine directly in Simulink can be wrapped in a way that looks like a machine in Simscape Electrical. Then, more complicated circuits or drives could be attached (albeit with a pretty long run time in some cases). A Simulink model using Simscape Electrical components is shown below as Figure 5. For its mechanical model, Simscape blocks specify a constant rotation speed.
text
Figure 5: Simscape Electrical model of PM generator driving a balanced, three-phase load.

To wrap the model, a set of three controlled current sources realizes the outputs of the S-function model. Voltage measurements across the current sources provide inputs for the terminal voltage of the Simulink block. The somewhat messy wrapping of the S-function model is shown below in Figure 6.
text
Figure 6: Simscape Electrical model of PM generator driving a balanced, three-phase load.

Example models are in the attached SimpleTransientExample.zip. The zip file contains a FEMM version of the simulation and a version with the simple analytical model for comparison.

Future Work

Although transient simulations are now possible with FEMM, future work could increase the utility of these simulations. Possible future work could include:



Attachments
File Last modified Size
SimpleTransientExample.zip 2018-10-10 19:07 108Kb
femm42src_22Oct2023.zip 2023-10-22 18:15 3Mb
femm42bin_x64_22Oct2023.exe 2023-10-22 18:15 10Mb
femm42bin_win32_22Oct2023.exe 2023-10-22 18:16 8Mb
pyfemm-0_1_4.zip 2023-10-22 18:19 17Kb
femm42bin_arm64_22Oct2023.exe 2023-11-26 18:28 16Mb

Older Development Versions are also still available.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki