Mixed Signal & Domain Simulation for Embedded Worlds

Platise Ferromagnetic (Non-Linear) Model

Represents a novel mathematical model for describing a non-linear characteristics of soft ferromagnetic materials without hysteresis.

Uros Platise, 6 November 2022

In power electronics magnetic materials represent key components for which B(H) curves are typically described with charts. Users then need to re-type the values which simulators and solvers then interpolate them, either with linear or cubic splines. Extra tweaking is needed to ensure monotonically increasing function to avoid local minimums causing divergence. Here another approach is represented; instead of re-typing the B(H) curve values a material is rather described by means of dipoles domains, where each domain is defined by two parameters B_s and H_m only. The Platise model easily describes soft ferromagnetic material, typically with a single dipole domain, nanocrystalline and other ferromagnetic compositions with two dipoles domains, thus with four parameters only. The represented model has been implemented and used in ngspice and Elmer FEM software. It represents an option to replace the traditional way of describing characteristics of ferromagnetic materials.

The Tools

Isotel NgSpice Fork: Core Model (core)

Isotel NgSpice Fork in addition to the latest ngspice master branch provides the updated Xspice core code-model, mode = 3.


Elmer FEM

Elmer FEM is a High Performance Parallel Computing Open Source Multi-physical Simulation software. It is available for Linux, macOS and Windows. Solvers and models include:

  • Electrostatics

  • 2D/3D Magnetic Field

  • Coil Circuits, and Magnetic Induction

  • Electromagnetic Waves, Electrokinetics

  • Fluid and Solid Mechanics with Mesh Adaptation

  • Acoustics, and more.


Background Theory

By intuitive derivation, while searching for a fast, smooth and monotonic function to describe B-H curve of soft ferromagnetic materials, good non-linear approximate without hysteresis of the magnetic flux density B(H) for given magnetic field strength H has been found to be well represented by a sum of N distinct dipoles domains:

B(H) = \sum_{i=1}^N B_{s_i} \frac{H}{\sqrt{H^2_{m_i} + H^2}} + \mu_0 H

where the B_{s_i} > 0 represents saturating (maximum) magnetic flux density of the i-th dipole domain, the H_{m_i} > 0 magnetizing field strength of the i-th dipole domain, and the \mu_0 permeability of the vacuum. The resulting approximate is a continuous, smooth and monotonically increasing function. It offers very fast direct calculation as used in spice simulation. More complex descriptions may include temperature (T) and frequency dependencies i.e. within the B(H, T) as B_{s_i}(T) and the H_{m_i}(T) for each i-th domain, or different pairs of B_{s_i}, H_{m_i} are obtained at different operational temperatures. Herein represented model does not include hysteresis loop typically given by coercitivity parameter H_c

A direct analytical inverse H(B) for given above B(H) needed by A-V solvers, as i.e. Elmer FEM, has not been found yet, except for the N=1 a reasonable approximate exists. Inverse of above general solution can so far be efficiently computed using the Newton iterative method.

One of the ways to calculate the B_{s_i} and H_{m_i} from existing B-H curve charts is to use python scipy library and the scipy.curve_fit() method. One could try first for N=1 and then N=2 and so on; a number of different slopes reveals the number of dipoles domains, thus the N. Two examples follow.

NgSpice Usage

Platise model has been added to the Xspice core model as mode=3 available in the Isotel NgSpice fork only. The existing H_array and B_array vectors are (re-)used to describe dipoles H_{m_i} and B_{s_i} respectively. If one dipole is given only, mode=3 is selected automatically as it cannot describe a single linear segment in the otherwise the default PWL mode.

A soft-ferrit core material 26G from Iskra Feriti at T=25°C and f=5 kHz, for some hypothetical dimensions A and len is shown below. It is approximated with a single dipole domain (N=1) only and the result is compared with pice-wise interpolation (PWL mode) from the points given by the data-sheet. The current through the voltage source i(V1) represents the magnetic flux B \cdot A and voltage source V1 represents the stimulus magnetomotive force H \cdot len.

* For easier representation we set both to 1, therefore the current i(V1)
* directly represents the B, as current is equal to a flux = B A
.param A   = 1
.param len = 1

* mode=3 selects the platise model
.model if26g core (H_array = [70] B_array = [0.361] area={A} length={len} mode=3)

* Xspice analog core model
A1 (1 0) if26g

* Magnetomotive stimulus, len=1, from -400 A to 400 A as a transient
V1 1 0 PULSE(-400 400 0 0.8ms 1ms)
../../_images/if26g-bh.png

Elmer FEM Usage

Platise Ferromagnetic Core has been deployed into the Elmer main development stream by calling the PlatiseFerroModel procedure. Four keywords have been introduced to be used under the Material section to specify the dipoles and control the inverse calculation.

The H-B curve, given as points from the CERN example:

has been characterized with two dipoles only, sufficiently well describing the characteristics:

PFM Dipoles Field Strength(2) = 2.63089794e2 1.96053253e4
PFM Dipoles Flux Density(2)   = 1.56587017   5.70574118e-1

! Two optional parameters
!PFM Relative Tolerance = 1e-5
!PFM Max Iterations = 100

H-B Curve = Variable "dummy"
   Procedure "MagnetoDynamics" "PlatiseFerroModel"

The two optional parameters provide additional control:

  • PFM Relative Tolerance = 1e-5, for instance reduces the required relative tolerance from the default 1e-6. Reduction for a decade typically reduces one iteration only inside the non-saturated area of the B-H curve and significantly more within the saturated area. Note that too low tolerance may destabilize Elmer non-linear solver resulting in increased number of iterations.

  • PFM Max Iterations = 100, reduces the max number of iterations from the default 1000. Typically this does not need to be controlled as under normal conditions algorithm should never reach 1000 iterations, but rather around 6 (for the default PFM Relative Tolerance of 1e-6) within non-saturated area and around 50 when it is deeply saturated.

../../_images/curve_BH-CERN.png

Blue line shows Platise model and red linear segments are based on original B-H points.

Complete example can be found at: https://github.com/ElmerCSC/elmer-elmag/tree/main/PlatiseFerroModel

References

    1. Platiše, “High-precision wide-bandwidth isolated current measurement in networked devices: doctoral dissertation = Natančno širokopasovno izolirano merjenje toka v omreženih napravah,”, [U. Platiše], Ljubljana, 2021, pp. 25-31

Download Software

User Guides

Isotel NgSpice Fork

GitHub MixedSim Open-Source Library

Introduction to Open Source Spice Mixed Signal & Verilog Simulation

Conceptual Simulation of Digital Sine Generator from Eagle

Mixed-domain Simulation and Visualization of a Two Wheel Robot with Blender Open-source Software

The Easiest Way of Simulating C/C++ Code Together with an Analog & Digital Spice Simulation

Platise Ferromagnetic (Non-Linear) Model