Magnetic Core

This function is a conceptual model which is used as a building block to create a wide variety of inductive and magnetic circuit models. This function is almost always expected to be used in conjunction with the "lcouple" model to build up systems which mock the behavior of linear and nonlinear magnetic components. There are two fundamental modes of operation for the core model. These are the pwl mode (which is the default, and which is the most likely to be of use to you) and the hysteresis mode. These are detailed below.

PWL Mode (mode = 1)

The core model in PWL mode takes as input a voltage which it treats as a magnetomotive force (mmf) value. This value is divided by the total effective length of the core to produce a value for the Magnetic Field Intensity, H. This value of H is then used to find the corresponding Flux Density, B, using the piecewise linear relationship described by you in the H_array / B_array coordinate pairs. B is then multiplied by the cross-sectional area of the core to find the Flux value, which is output as a current. The pertinent mathematical equations are listed below:

H = mmf/L, where L = Length

Here H, the Magnetic Field Intensity, is expressed in ampere-turns/meter.

B = f(H)

The B value is derived from a piecewise linear transfer function described to the model via the (H_array[],B .array[]) parameter coordinate pairs. This transfer function does not include hysteretic effects; for that, you would need to substitute a HYST model for the core.

Φ = BA, where A = Area

The final current allowed to flow through the core is equal to Φ. This value in turn is used by the "lcouple" code model to obtain a value for the voltage reflected back across its terminals to the driving electrical circuit.

The following example code shows the use of two "lcouple" models and one core model to produce a simple primary/secondary transformer.

al (2 0) (3 0) primary
.model primary lcouple (num.turns = 155)

a2 (3 4) iron_core
.model iron_core core (H.array = [-1000 -500 -375 -250 -188 -125 -63 0 63 125 188 250 375 500 1000]
+                      B.array = [-3.13e-3 -2.63e-3 -2.33e-3 -1.93e-3 -1.5e-3 -6.25e-4 -2.5e-4 0 2.5e-4 6.25e-4 1.5e-3 1.93e-3 2.33e-3 2.63e-3 3.13e-3]
+                      area = 0.01 length = 0.01)

a3 (5 0) (4 0) secondary
.model secondary lcouple (num.turns = 310)

HYSTERESIS Mode (mode = 2)

The core model in HYSTERESIS mode takes as input a voltage which it treats as a magnetomotive force (mmf) value. This value is used as input to the equivalent of a hysteresis code model block. The parameters defining the input low and high values, the output low and high values, and the amount of hysteresis are as in that model. The output from this mode, as in PWL mode, is a current value which is seen across the mc port. An example of the core model used in this fashion is shown below:

al (2 0) (3 0) primary
.model primary lcouple (num_turns = 155)

a2 (3 4) iron_core
.model iron_core core (mode = 2 in_low=-7.0 in_high=7.0
+                      out_lower_limit=-2.5e-4 out_upper_limit=2.5e-4
+                      hyst = 2.3)
a3 (5 0) (4 0) secondary
.model secondary lcouple (num_turns = 310)

Note: One final note to be made about the two core model modes is that certain parameters are available in one mode, but not in the other. In particular, the in_low, in_high, out_lower_limit, out_upper_limit, and hysteresis parameters are not available in PWL mode. Likewise, the H_array, B_array, area, and length values are unavailable in HYSTERESIS mode. The input_domain and fraction parameters are common to both modes (though their behavior is somewhat different; for explanation of the input_domain and fraction values for the HYSTERESIS mode, you should refer to the hysteresis code model discussion).

Port Table

Description Direction Default Type Allowed Types Vector Vector Bounds Null Allowed
magnetic core INOUT gd g,gd NO   NO

Parameter Table

Name Description Data Type Default Value Limits Vector Vector Bounds Null Allowed
H_array magnetic field array Real     YES 2 / - NO
B_array flux density array Real     YES 2 / - NO
area cross-sectional area Real     NO   NO
length core length Real     NO   NO
input_domain input smoothing domain Real 0.01 1e-12 / 0.5 NO   YES
fraction smoothing fractional/abs switch Boolean TRUE   NO   YES
mode mode switch (1 = pwl, 2 = hyst) Int 1 1 / 2 NO   YES
in_low input low value Real 0.0   NO   YES
in_high input high value Real 1.0   NO   YES
hyst hysteresis Real 0.1 0 / - NO   YES
out_lower_limit output lower limit Real 0.0   NO   YES
out_upper_limit output upper limit Real 1.0   NO   YES

Error Messages

CORE: Allocation calloc failed!

This message is a generic message related to allocating sufficient storage for the H and B array values.

CORE: Violation of 50%, rule in breakpoints!

This message occurs whenever the input_domain value is an absolute value and the H coordinate points are spaced too closely together (overlap of the smoothing regions will occur unless the H values are redefined).

See also

Inductive Coupling
XSPICE Devices
XSPICE Code Models