Maker Pro
Maker Pro

Simulating non linear magnetics

A

analog

Jan 1, 1970
0
Hi all,

A circuit simulator oriented toward switching power conversion cannot
be considered complete without a non linear inductor model as part of
the package. This is absolutely vital for simulating the mundane such
as variations in core loss with operating conditions as well as the
more exotic such as magamps and ferroresonant transformers.

Toward this end I have recently been amusing myself trying to create
a good non linear inductor model for LTspice. As with other similar
models, it integrates inductor voltage and applies it to a bi-
directional zener like impedance to model saturation. In addition it
may have the following new(?) and useful features:

+ True dc and ac hysteresis effects
+ Options for modeling both round and square loop materials
(using fast LTspice specific features)
+ A simple way of modeling the addition of a core gap
+ Adjustable frequency dependent losses

Although the qualitative results of this model have a satisfying
look and feel about them, the model is preliminary and has not been
quantitatively verified. Also, I'm not sure what the friendliest
parameter format to present to the user would be (how best to
relate core and material parameters to input terminal parameters).
Should turns and core geometry be part of the model so that the
internal nodes proportional to B and H could be scaled and related
to material parameters (and be made available as outputs)?

Ideas, comments? -- analog

The LTspice file follows below (as usual, beware unintended word wrap):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 4
SHEET 1 1044 680
WIRE -112 -80 -112 -176
WIRE -112 32 -112 0
WIRE -160 -64 -160 -112
WIRE -160 -112 -240 -112
WIRE -304 -112 -304 -80
WIRE -304 0 -304 32
WIRE -160 -16 -160 32
WIRE -240 32 -240 -16
WIRE -240 -80 -240 -112
WIRE -240 -112 -304 -112
WIRE -352 -16 -352 32
WIRE -352 32 -432 32
WIRE -352 -112 -432 -112
WIRE -352 -112 -352 -64
WIRE -432 -112 -464 -112
WIRE -432 32 -496 32
WIRE -432 32 -432 0
WIRE -432 -80 -432 -112
WIRE -768 48 -768 32
WIRE -768 -80 -768 -112
WIRE -768 32 -768 0
WIRE -736 -112 -768 -112
WIRE 0 -80 0 -112
WIRE 0 -112 16 -112
WIRE 224 -112 224 -64
WIRE 224 -16 224 32
WIRE 272 32 272 0
WIRE 144 32 144 -16
WIRE 144 -80 144 -112
WIRE 144 -112 224 -112
WIRE 432 -176 432 -80
WIRE 432 0 432 32
WIRE 432 -176 352 -176
WIRE -112 -176 -96 -176
WIRE -16 -176 144 -176
WIRE 272 -80 272 -176
WIRE 512 -176 512 -80
WIRE -704 -112 -736 -112
WIRE 0 32 0 0
WIRE 224 -176 272 -176
WIRE 272 -176 352 -176
WIRE 512 0 512 32
WIRE 112 -112 128 -112
WIRE -496 -80 -496 -112
WIRE -496 -112 -624 -112
WIRE -496 0 -496 32
WIRE -496 32 -768 32
WIRE 16 -112 32 -112
WIRE 128 -112 144 -112
WIRE 480 -176 512 -176
WIRE 352 -176 352 -80
WIRE 352 -16 352 32
WIRE -112 -176 -160 -176
WIRE -464 -112 -496 -112
WIRE 432 -176 480 -176
FLAG -464 -112 2
FLAG -768 48 0
FLAG -736 -112 1
FLAG -304 32 0
FLAG -240 32 0
FLAG -160 32 0
FLAG -112 32 0
FLAG 224 32 0
FLAG 144 32 0
FLAG 272 32 0
FLAG 432 32 0
FLAG 512 32 0
FLAG 0 32 0
FLAG 16 -112 3
FLAG 128 -112 4
FLAG 480 -176 5
FLAG 352 32 0
FLAG -160 -176 flux
IOPIN -160 -176 Out
SYMBOL g -304 -96 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName G1
SYMATTR Value 1
SYMBOL cap -256 -80 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 64 Left 0
WINDOW 39 32 28 Left 0
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL e -112 -96 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL voltage -112 -176 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 Invisible 0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL f -432 -80 R0
WINDOW 0 16 0 Left 0
WINDOW 3 40 41 Left 0
WINDOW 123 16 80 Left 0
SYMATTR InstName F1
SYMATTR Value V1
SYMATTR Value2 1
SYMBOL voltage -768 -96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 48 72 Left 0
WINDOW 3 -48 176 Left 0
WINDOW 0 -42 57 Right 0
SYMATTR Value SINE(0 1 {f} 0 {-f/3} 90)
SYMATTR InstName Vs
SYMBOL g 272 -96 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName G2
SYMATTR Value 50m
SYMBOL cap 128 -80 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 64 Left 0
SYMATTR InstName C2
SYMATTR Value 1n
SYMBOL h 0 -96 M0
WINDOW 0 16 16 Left 0
WINDOW 3 40 56 Left 0
WINDOW 123 16 96 Left 0
SYMATTR InstName H1
SYMATTR Value V1
SYMATTR Value2 1k
SYMBOL res 416 -96 R0
WINDOW 0 32 16 Left 0
WINDOW 3 32 96 Left 0
SYMATTR InstName R3
SYMATTR Value 1k
SYMBOL ind -480 -96 M0
WINDOW 0 48 40 Left 0
WINDOW 3 48 72 Left 0
SYMATTR InstName L1
SYMATTR Value {100u*n}
SYMBOL res -720 -96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value 50
SYMBOL res 240 -192 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R2
SYMATTR Value 1
SYMBOL Misc\\xvaristor 496 -96 R0
WINDOW 0 48 16 Left 0
WINDOW 3 48 48 Left 0
WINDOW 39 48 72 Left 0
WINDOW 40 48 96 Left 0
SYMATTR InstName X2
SYMATTR Value Rnd
SYMATTR SpiceLine v=3k
SYMATTR SpiceLine2 r=0
SYMBOL Misc\\xvaristor 128 -128 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
WINDOW 39 56 56 VTop 0
WINDOW 40 80 56 VTop 0
SYMATTR InstName X1
SYMATTR Value Rnd
SYMATTR SpiceLine v=100
SYMATTR SpiceLine2 r=3k
SYMBOL cap 336 -80 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 64 Left 0
SYMATTR InstName C3
SYMATTR Value 5n
TEXT -816 200 Left 0 !.step param n list .1 1 1k
TEXT -312 88 Left 0 !.subckt Rnd 1 2 v=1 r=0\n.param n=v/.83-1\nE1 1 3 3 2 {max(n,0)}\nD1 2 3 rn\nD2 3 2 rn\n.model rn d(Is=1p Rs={r/n}) \n.ends Rnd
TEXT 128 88 Left 0 !.subckt Sqr 1 2 v=1 r=0\nD1 1 2 sq\n.model sq d(Vfwd={v} Vrev={v} Rs={r}) \n.ends Sqr
TEXT -816 232 Left 0 !.tran 0 {15/f} {1m/f} {1m/f} uic
TEXT -816 168 Left 0 !.param n=1 f=20k
TEXT -504 -176 VLeft 0 ;L1 models an air gap
TEXT -240 -232 VLeft 0 ;G1, C1, E1 models volt-sec\n applied to inductor
TEXT -424 -176 VLeft 0 ;F1, V1 reflects current resulting\n from applied volt-seconds
TEXT 520 -224 VLeft 0 ;X2 models saturation effects
TEXT -664 -176 VLeft 0 ;R1 models winding resistance
TEXT 432 -224 VLeft 0 ;R3 models low level\n linear inductance
TEXT 168 -240 VLeft 0 ;R2 models incremental\n saturation inductance
TEXT 48 -232 VLeft 0 ;H1, X1, C2, G2 models hysteresis\n effects (dc + ac widening)
TEXT 352 -224 VLeft 0 ;C3 models linear core loss
TEXT -80 -256 VLeft 0 ;V1 senses current drawn by\n applied volt-seconds
TEXT -112 -656 Bottom 0 ;Non Linear Inductor Model (Preliminary) by [email protected] - 04/04\nfor B - H style curves plot V(flux) and change x-axis from time to I(R1)
TEXT 128 224 Left 0 ;Note: for abrupt limiting effects\nsubstitute "Sqr" subcircuit model
LINE Normal -56 -64 -56 -136 2
LINE Normal -272 -144 -368 -96 2
LINE Normal -144 -144 -272 -144 2
LINE Normal -384 -64 -368 -96 2
LINE Normal -96 -160 -144 -144 2
 
G

Genome

Jan 1, 1970
0
| Hi all,
|
| A circuit simulator oriented toward switching power conversion cannot
| be considered complete without a non linear inductor model as part of
| the package. This is absolutely vital for simulating the mundane such
| as variations in core loss with operating conditions as well as the
| more exotic such as magamps and ferroresonant transformers.
|
| Toward this end I have recently been amusing myself trying to create
| a good non linear inductor model for LTspice. As with other similar
| models, it integrates inductor voltage and applies it to a bi-
| directional zener like impedance to model saturation. In addition it
| may have the following new(?) and useful features:
|
| + True dc and ac hysteresis effects
| + Options for modeling both round and square loop materials
| (using fast LTspice specific features)
| + A simple way of modeling the addition of a core gap
| + Adjustable frequency dependent losses
|
| Although the qualitative results of this model have a satisfying
| look and feel about them, the model is preliminary and has not been
| quantitatively verified. Also, I'm not sure what the friendliest
| parameter format to present to the user would be (how best to
| relate core and material parameters to input terminal parameters).
| Should turns and core geometry be part of the model so that the
| internal nodes proportional to B and H could be scaled and related
| to material parameters (and be made available as outputs)?
|
| Ideas, comments? -- analog
|

Nice...... I did this once as a rip off from something downloaded from
Intusoft. Very much simpler though and looking at yours tells me what a
novice I am when it comes to Spice.

One thing I did do, which may be of interest, is instead of using diodes
to model saturation I used parallel inverse voltage controlled switches
with what in LTspice would be negative hysteresis for a smooth
logaritmic transition(?)

Setting the threshold would set the saturation level. Setting the
hysteresis would determine the sharpness of saturation. It might be
intuitively better than using diodes.

DNA
 
K

Kevin Aylward

Jan 1, 1970
0
analog said:
Hi all,

A circuit simulator oriented toward switching power conversion cannot
be considered complete without a non linear inductor model as part of
the package. This is absolutely vital for simulating the mundane such
as variations in core loss with operating conditions as well as the
more exotic such as magamps and ferroresonant transformers.

Toward this end I have recently been amusing myself trying to create
a good non linear inductor model for LTspice. As with other similar
models, it integrates inductor voltage and applies it to a bi-
directional zener like impedance to model saturation.

Why not use the tanh() function for limiting, its a bit more (spice)
general purpose than max(). It saves using the diodes as well.
In addition it
may have the following new(?) and useful features:

+ True dc and ac hysteresis effects
+ Options for modeling both round and square loop materials
(using fast LTspice specific features)
+ A simple way of modeling the addition of a core gap
+ Adjustable frequency dependent losses

Ahmmm. PSpice already has non-linear, hysteretic cores. I was under the
impression that LTSpice already supported this as it is supposed to be
100% compatible.
Although the qualitative results of this model have a satisfying
look and feel about them, the model is preliminary and has not been
quantitatively verified. Also, I'm not sure what the friendliest
parameter format to present to the user would be (how best to
relate core and material parameters to input terminal parameters).
Should turns and core geometry be part of the model so that the
internal nodes proportional to B and H could be scaled and related
to material parameters (and be made available as outputs)?

Ideas, comments? -- analog

The BH loop looks the right shape. At the moment I have no idea whether
this time domain response is compatible with what the small signal ac
response does. Its a bit complicated to see off hand.

What's the mechanism for the dc hysteresis? I dont fel that inclined to
work out the details from scratch.

Kevin Aylward
[email protected]
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

"quotes with no meaning, are meaningless" - Kevin Aylward.
 
G

Genome

Jan 1, 1970
0
| Hi all,
|
| A circuit simulator oriented toward switching power conversion cannot
| be considered complete without a non linear inductor model as part of
| the package. This is absolutely vital for simulating the mundane such
| as variations in core loss with operating conditions as well as the
| more exotic such as magamps and ferroresonant transformers.
|

Zurp.....

Using SI units I get this for an ideal inductor model. I'm not sure it's
absolutely vital though.

DNA

Version 4
SHEET 1 1208 680
WIRE 480 304 480 352
WIRE 608 224 608 176
WIRE 608 176 480 176
WIRE 480 176 480 224
WIRE 608 288 608 352
WIRE 608 352 480 352
WIRE 480 352 400 352
WIRE 400 352 288 352
WIRE -32 544 -32 576
WIRE 64 544 64 576
WIRE -32 576 64 576
WIRE 64 464 64 432
WIRE 64 432 96 432
WIRE -32 464 -32 432
WIRE -32 432 0 432
WIRE 288 304 288 352
WIRE 288 224 288 176
WIRE 288 176 400 176
WIRE 400 176 400 240
WIRE -32 608 -32 576
WIRE -32 304 -32 352
WIRE 288 352 80 352
WIRE -32 352 -32 384
WIRE -32 224 -32 176
WIRE -32 176 80 176
WIRE 432 288 400 288
WIRE 400 288 400 352
WIRE 432 240 400 240
WIRE 640 176 608 176
WIRE 864 304 864 352
WIRE 864 352 736 352
WIRE 864 224 864 176
WIRE 864 176 992 176
WIRE 176 544 176 576
WIRE 176 576 64 576
WIRE 176 464 176 432
WIRE 176 432 208 432
WIRE 992 176 992 224
WIRE 992 304 992 352
WIRE 992 352 864 352
WIRE 80 224 80 176
WIRE 80 176 144 176
WIRE 80 304 80 352
WIRE 80 352 -32 352
WIRE 288 464 288 432
WIRE 288 432 320 432
WIRE 400 464 400 432
WIRE 400 432 432 432
WIRE 288 544 288 576
WIRE 288 576 176 576
WIRE 400 544 400 576
WIRE 400 576 288 576
WIRE 736 224 736 176
WIRE 736 176 768 176
WIRE 736 304 736 352
WIRE 736 352 608 352
FLAG 0 432 N
IOPIN 0 432 Out
FLAG 96 432 Ae
IOPIN 96 432 Out
FLAG -32 608 0
FLAG -32 384 0
FLAG 144 176 VIN
IOPIN 144 176 Out
FLAG 640 176 B
IOPIN 640 176 Out
FLAG 208 432 Ui
IOPIN 208 432 Out
FLAG 320 432 Le
IOPIN 320 432 Out
FLAG 432 432 G
IOPIN 432 432 Out
FLAG 768 176 Ue
IOPIN 768 176 Out
SYMBOL g 480 208 R0
WINDOW 0 37 44 Left 0
WINDOW 3 38 69 Left 0
SYMATTR InstName G1
SYMATTR Value 1
SYMBOL cap 592 224 R0
WINDOW 0 42 30 Left 0
WINDOW 3 43 55 Left 0
SYMATTR InstName C1
SYMATTR Value 1
SYMBOL bv 288 208 R0
WINDOW 0 38 56 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName B2
SYMATTR Value V=V(VIN)/(V(N)*V(Ae))
SYMBOL voltage -32 448 R0
WINDOW 0 38 38 Left 0
WINDOW 3 38 63 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName N
SYMATTR Value 1
SYMBOL voltage 64 448 R0
WINDOW 0 40 38 Left 0
WINDOW 3 39 61 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Ae
SYMATTR Value 1
SYMBOL voltage -32 208 R0
WINDOW 0 38 55 Left 0
WINDOW 3 38 77 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PULSE(-1 1 0 1n 1n 1 2)
SYMBOL bv 864 208 R0
WINDOW 0 40 56 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName B4
SYMATTR Value V=V(B)/(V(Ue)*V(N))
SYMBOL voltage 176 448 R0
WINDOW 0 39 40 Left 0
WINDOW 3 38 63 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Ui
SYMATTR Value 1
SYMBOL res 976 208 R0
WINDOW 0 36 47 Left 0
WINDOW 3 36 71 Left 0
SYMATTR InstName R1
SYMATTR Value 1R
SYMBOL bi 80 224 R0
WINDOW 0 37 39 Left 0
WINDOW 3 24 88 Invisible 0
SYMATTR InstName B1
SYMATTR Value I=I(R1)
SYMBOL voltage 288 448 R0
WINDOW 0 38 41 Left 0
WINDOW 3 39 64 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Le
SYMATTR Value 1
SYMBOL voltage 400 448 R0
WINDOW 0 38 40 Left 0
WINDOW 3 39 61 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName G
SYMATTR Value 0
SYMBOL bv 736 208 R0
WINDOW 0 39 55 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName B3
SYMATTR Value V=V(ui)/(1+V(g)*V(Ui)/V(le))
TEXT 512 456 Left 0 ;B2 V=VIN/(N*Ae)
TEXT 512 528 Left 0 ;V1 V=PULSE(-1 1 0 1n 1n 1 2)
TEXT 512 552 Left 0 !.tran 0 2 0 uic
TEXT 512 504 Left 0 ;B4 V=B/(Ue*N)
TEXT 512 432 Left 0 ;B1 I=I(R1)
TEXT 512 480 Left 0 ;B3 V=Ui/(1+G*Ui/Le) G<<Le
 
M

Mike Engelhardt

Jan 1, 1970
0
Analog,
A circuit simulator oriented toward switching power
conversion cannot be considered complete without a non-
linear inductor model as part of the package. This is
absolutely vital for simulating the mundane such as
variations in core loss with operating conditions as well
as the more exotic such as magamps and ferroresonant
transformers[...]

It was hard to justify adding a new native SPICE device for non-
linear inductors to LTspice for SMPS's because the non-linear
properties of the magnetic material usually don't need to be
simulated(outside of magamps and core oscillators which don't
commercially interest me). It's sort of like wanting all your
power FETs to breakdown in simulation if they're over-voltaged.
My own preferred practice is to have power FET's that don't
break down at any voltage in simulation and then, after the
thing works in simulation, check that the FET's aren't over-
voltaged. Similarity for inductors, it's much more practical
to simulate with linear inductors and then check at the end if
inductors I want to use lose differential inductance due to peak
currents moving the cores toward saturation. After all, since
saturation flux density goes down monotonically with temperature,
when simulating a typical case in the middle of the service
temp range, the magnetics had better look perfectly linear.
Also, core losses are usually dominated by linear effects.
Hysteric loss; i.e., the area opened by the B-H curve times the
core volume times the frequency; basically vanishes in comparison
when you step back from saturation.

However, despite the fact that I couldn't come up with a
justification reflecting good engineering sensibilities for
needing non-linear magnetics in LTspice, I sure did find it
immensely unsatisfying that there wasn't an intrinsic non-
linear magnetic in LTspice. After all, you can model the FET
breaking down by paralleling a diode with break down if you
want, but it's comparatively much more difficult to decorate
your simulation with some core saturation.

So I've been implementing and released today a new type of non-
linear inductor in LTspice. Its based on a model first proposed
by John Chan, et la. in IEEE Transactions on Computer-Aided
Design, vol. 10. No. 4 April 1991 as an improvement over the
Jiles-Atherton model. This improved model was first implemented
in DSPICE for Daisy Corp and has been copied by other high-
end SPICE programs. The model needs 7 basic parameters:

Hc coercive force[Amp-turns/meter]
Br Remnant Flux[Webers]
Bs Saturation Flux Density[Webers]
Lm Magnetic Length(excluding gap)[meter]
Lg Length of gap[meter]
A cross sectional area[meter**2]
N number of turns

The model prescribes how to transverse the B-H plane given
changes in H. Given that, LTspice will solve for how H moves
with winding current for gaped magnetics under the assumption
of uniform cross sectional area and thin or uniformly
distributed gap.

Here's an example that shows inductance vs current for a
gapped core. You can read out the inductance as V(n001)
since the inductor is given a unity dI/dt. It's following
the initial magnetization curve, so you can see that the
permeability first increases from the initial value as the
current is ramped and then drops to nearly zero as it
saturates. Since the gap makes the inductance insensitive
to the exact permeability of the core, you have to really
zoom in on V(n001) to see that it does increase. The peak
is when H inside the core is equal to its Hc.

*
L1 N001 0 Hc=16. Bs=.44 Br=.10 A=0.0000251
+ Lm=0.0198 Lg=0.0006858 N=1000 Rser=0
I1 0 N001 PWL(0 0 1 1)
..tran .5
..options maxstep=10u
..end

As this is a new feature, there's a couple limitations to
its implementation. First of all, it not yet in the alternate
solver. You have to use the normal solver(see Tools=>Control
Panel=>SPICE=>Solver). Second, it doesn't work with K-
statements. Coupled non-linear cores will come some time
later. In the meanwhile, you can use cross-coupled
transconductances to model coupling. An example schematic is
appended.

Please report problems you may have with this critter to the
e-mail address on the program's Help=>About dialog box.
E-mail to this posting address isn't read.

BTW, there is an otherwise undocumented feature in LTspice
regarding non-linear inductors. Just as there was an arbitrary
capacitance where you write an expression for the charge,
there is now an arbitrary inductance where you write an
equation for the flux. Here's and example of that:

*
L1 N001 0 Flux=tanh(x) ; x is a keyword for the current
I1 0 N001 PWL(0 0 10 10)
..tran 5
..end

--Mike

Here's the example of a saturating transformer.
The simulation is run twice, once with and again
without a load. The core saturates in the first
simulation but secondary current in the second
one keeps the core from saturating for the same
input signal.

--- xformer.asc ---
Version 4
SHEET 1 1608 680
WIRE 560 192 560 240
WIRE -32 80 16 80
WIRE -32 240 -32 208
WIRE -32 128 -32 80
WIRE 96 80 560 80
WIRE 768 240 768 208
WIRE 768 128 768 96
WIRE 768 96 864 96
WIRE 864 96 864 128
WIRE 864 208 864 240
WIRE 992 240 992 208
WIRE 992 128 992 96
WIRE 992 96 864 96
WIRE 752 16 864 16
WIRE 864 16 864 96
WIRE 864 16 1008 16
WIRE 720 144 704 144
WIRE 608 192 640 192
WIRE 704 80 704 144
WIRE 704 0 704 -16
WIRE 704 -16 640 -16
WIRE 640 -16 640 192
WIRE 704 144 608 144
WIRE 640 192 720 192
WIRE 752 64 768 64
WIRE 992 64 1008 64
WIRE 1056 80 1056 144
WIRE 1056 144 1040 144
WIRE 1040 192 1136 192
WIRE 1056 -16 1056 0
WIRE 560 80 608 80
WIRE 560 80 560 112
WIRE 608 80 608 144
WIRE 608 192 608 240
WIRE 608 240 560 240
WIRE 1184 192 1184 240
WIRE 1136 -16 1136 192
WIRE 1136 192 1184 192
WIRE 1136 -16 1056 -16
WIRE 1344 96 1344 128
WIRE 1344 208 1344 240
WIRE 1056 144 1184 144
WIRE 1184 144 1184 96
WIRE 1184 96 1344 96
WIRE 1184 240 1344 240
WIRE 1344 240 1344 256
WIRE 560 240 208 240
WIRE 208 240 208 272
FLAG 208 272 0
FLAG -32 240 0
FLAG 768 64 0
FLAG 864 240 0
FLAG 768 240 0
FLAG 992 240 0
FLAG 992 64 0
FLAG 1344 256 0
SYMBOL ind 576 96 M0
WINDOW 123 41 68 Left 0
WINDOW 39 43 91 Left 0
WINDOW 40 42 117 Left 0
WINDOW 0 43 16 Left 0
WINDOW 3 42 42 Left 0
SYMATTR Value2 A=0.0000251 Lm=0.0198
SYMATTR SpiceLine Lg=0.0006858 N=1000
SYMATTR SpiceLine2 Rser=0.
SYMATTR InstName L1
SYMATTR Value Hc=16. Bs=.44 Br=.10
SYMBOL voltage -32 112 R0
SYMATTR InstName V1
SYMATTR Value sine(0 10 100)
SYMBOL res 112 64 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL g 768 112 R0
SYMATTR InstName G1
SYMATTR Value 1
SYMBOL g 992 112 M0
SYMATTR InstName G2
SYMATTR Value 1
SYMBOL g 704 -16 M0
WINDOW 0 -11 9 Right 0
WINDOW 3 -12 103 Right 0
SYMATTR InstName G3
SYMATTR Value 1
SYMBOL g 1056 -16 R0
SYMATTR InstName G4
SYMATTR Value 1
SYMBOL res 848 112 R0
SYMATTR InstName Rx
SYMATTR Value 1Meg
SYMBOL res 1328 112 R0
SYMATTR InstName Rload
SYMATTR Value {R}
TEXT 0 272 Left 0 !.tran 50m
TEXT 1296 328 Left 0 !.step param R list 1Meg 1
TEXT 688 -120 Left 0 ;1:1 transformer
LINE Normal 1232 -96 256 -96
LINE Normal 1232 304 1232 -96
LINE Normal 256 304 1232 304
LINE Normal 256 -96 256 304
 
A

analog

Jan 1, 1970
0
Mike said:
analog said:
A circuit simulator oriented toward switching power conversion
cannot be considered complete without a nonlinear inductor model
as part of the package. This is absolutely vital for simulating
the mundane such as variations in core loss with operating
conditions as well as the more exotic such as magamps and
ferroresonant transformers [...]

It was hard to justify adding a new native SPICE device for non-
linear inductors to LTspice for SMPS's because the non-linear
properties of the magnetic material usually don't need to be
simulated (outside of magamps and core oscillators which don't
commercially interest me). It's sort of like wanting all your
power FETs to breakdown in simulation if they're over-voltaged.

Thanks for indulging yourself and doing it anyway! It is a great
addition to LTspice and I'm sure it was a lot of fun to do, too.
However, despite the fact that I couldn't come up with a justifi-
cation reflecting good engineering sensibilities for needing non-
linear magnetics in LTspice, I sure did find it immensely unsatisfy-
fying that there wasn't an intrinsic non-linear magnetic in LTspice.
After all, you can model the FET breaking down by paralleling a
diode with breakdown if you want, but it's comparatively much more
difficult to decorate your simulation with some core saturation.

It turns out that this can be done relatively easily by adding one
B-source in series with a normal inductor as demonstrated in the
simulation file at the end of this post. Of course the new intrinsic
arbitrary inductor does run faster (about twice as fast), but this
small difference would normally be buried by the computation time of
the rest of a typical switching power supply simulation.
So I've been implementing and released today a new type of non-
linear inductor in LTspice. Its based on a model first proposed by
John Chan, et la. in IEEE Transactions on Computer-Aided Design,
vol. 10. No. 4 April 1991 as an improvement over the Jiles-Atherton
model.

"Nonlinear transformer model for circuit simulation"
Chan, J.H.; Vladimirescu, A.; Gao, X.-C.; Liebmann, P.; Valainis, J.
Computer-Aided Design of Integrated Circuits and Systems,
IEEE Transactions on, Vol.10, Iss.4, Apr 1991; Pages:476-482

Abstract: A transformer model which consists of a nonlinear core with
hysteresis and multiple windings is described as implemented in DSPICE.
In contrast to previous implementations, the nonlinear behavior of the
new model is described by continuous piecewise-hyperbolic functions
characterized by three parameters. These parameters are the same as
parameters previously published in the literature. A loop-traversing
algorithm has been implemented which avoids discontinuities and elimi-
nates both nonconvergence problems and the occurrence of erroneous
voltage spikes during time-domain simulation. In the large-signal time-
domain analysis the frequency-dependent eddy current losses in the core
and wire losses are modeled. Additional effects, such as wire skin
effect and temperature dependence, are also included. In the small-
signal AC analysis the transformer is modeled as frequency-dependent
lossy mutual inductors. For both analyses, the air gap and the elated
fringe field effect are modeled by extending the magnetic path length
of the core appropriately.
This improved model was first implemented in DSPICE for Daisy Corp
and has been copied by other high-end SPICE programs. The model
needs 7 basic parameters:

Hc Coercive field intensity [Amp-turns/meter]
Br Remnant flux density [Tesla = Webers/meter**2]
Bs Saturation flux density [Tesla = Webers/meter**2]
Lm Magnetic length (excluding gap) [meter]
Lg Length of gap [meter]
A Magnetic cross sectional area [meter**2]
N Number of turns

The model prescribes how to transverse the B-H plane given changes
in H. Given that, LTspice will solve for how H moves with winding
current for gaped magnetics under the assumption of uniform cross
sectional area and thin or uniformly distributed gap.

This model seems to strike a good balance between speed and detail.
For cores with a gap its reluctance will usually predominate over
that of the core and make fidelity to the exact shape of the B H
curve unimportant. But when there is no gap then an additional para-
meter for the relative permeability of the core could enable the
slope of the B H loop in the vicinity of zero crossing to be adjusted
independently of loop squareness.
Just as there was an arbitrary capacitance where you write an
expression for the charge, there is now an arbitrary inductance
where you write an equation for the flux.

Using LTspice's new arbitrary inductor, a simple linear inductor may
be modeled as Phi=L*i or in LTspice terminology:

Flux = {L}*x ; (no saturation)
Note: L is the parametrized inductance and x is the current through L.

Simple hard saturation can be modeled with a limit function:

Flux = {L}*limit(x,{-Is},{Is}) ; (hard saturation)
Note: Is is the parametrized saturation current.

A residual saturated inductance can easily be added to the model:

Flux = {L-Ls}*limit(x,{-Is},{Is})+{Ls}*x ; (stepped saturation)
Note: Ls is the parametrized saturation inductance.

The soft limit of the hyperbolic tangent can add more realism:

Flux ={(L-Ls)*Is}*tanh(x/{Is})+{Ls}*x ; (soft saturation)

For a very soft characteristic, use the arc tangent function:

Flux = {L*Is*2/Pi}*atan(x/{Is*2/Pi}) ; (very soft saturation)
Note: Ls is not really needed due to the very soft nature of atan.

The following circuit file demonstrates these techniques and more.
This file explores LTspice's new arbitrary inductor model and
compares it to other methods of modeling inductor saturation, such
as the B-source inductance multiplier method, the generalized
impedance converter method, and a method with current controlled
switches.

~~~saturating_inductor.asc~~~ (beware unintended word wrap)
Version 4
SHEET 1 1340 1060
WIRE -112 -80 -112 -112
WIRE -112 32 -112 0
WIRE -160 -64 -160 -112
WIRE -160 -112 -240 -112
WIRE -304 -112 -304 -80
WIRE -304 0 -304 32
WIRE -160 -16 -160 32
WIRE -240 32 -240 -16
WIRE -240 -80 -240 -112
WIRE -240 -112 -304 -112
WIRE -352 -16 -352 32
WIRE -352 -112 -432 -112
WIRE -352 -112 -352 -64
WIRE -432 32 -432 0
WIRE -432 -80 -432 -112
WIRE -1024 -256 -1024 -272
WIRE 48 -112 48 -80
WIRE 48 0 48 32
WIRE 48 -112 16 -112
WIRE -112 -112 -64 -112
WIRE 192 624 192 672
WIRE 192 736 192 768
WIRE 128 768 128 736
WIRE 128 672 128 624
WIRE 128 624 192 624
WIRE -464 -112 -432 -112
WIRE -576 -112 -544 -112
WIRE -1024 -352 -1024 -384
WIRE -1024 -384 -976 -384
WIRE 48 624 128 624
WIRE 48 128 128 128
WIRE 128 272 128 240
WIRE 128 160 128 128
WIRE -112 656 -112 624
WIRE -112 768 -112 736
WIRE -160 672 -160 624
WIRE -160 624 -240 624
WIRE -304 624 -304 656
WIRE -304 736 -304 768
WIRE -160 720 -160 768
WIRE -240 768 -240 720
WIRE -240 656 -240 624
WIRE -240 624 -304 624
WIRE -352 720 -352 768
WIRE -352 624 -432 624
WIRE -352 624 -352 672
WIRE -432 768 -432 736
WIRE -432 656 -432 624
WIRE 48 624 48 656
WIRE 48 736 48 768
WIRE 48 624 16 624
WIRE -112 624 -64 624
WIRE -464 624 -432 624
WIRE -576 624 -544 624
WIRE -112 160 -112 128
WIRE -112 272 -112 240
WIRE -160 176 -160 128
WIRE -160 128 -240 128
WIRE -304 128 -304 160
WIRE -304 240 -304 272
WIRE -160 224 -160 272
WIRE -240 272 -240 224
WIRE -240 160 -240 128
WIRE -240 128 -304 128
WIRE -352 224 -352 272
WIRE -352 128 -432 128
WIRE -352 128 -352 176
WIRE -432 272 -432 240
WIRE -432 160 -432 128
WIRE 48 128 48 160
WIRE 48 240 48 272
WIRE 48 128 16 128
WIRE -112 128 -64 128
WIRE -464 128 -432 128
WIRE -576 128 -544 128
WIRE -992 -112 -960 -112
WIRE -880 -112 -848 -112
WIRE -768 -112 -736 -112
WIRE -992 368 -960 368
WIRE -880 368 -864 368
WIRE -864 368 -848 368
WIRE -736 512 -736 480
WIRE -768 368 -752 368
WIRE -736 368 -736 400
WIRE -752 368 -736 368
WIRE -992 128 -960 128
WIRE -880 128 -864 128
WIRE -864 128 -848 128
WIRE -736 272 -736 240
WIRE -768 128 -752 128
WIRE -736 128 -736 160
WIRE -752 128 -736 128
WIRE -576 368 -544 368
WIRE -464 368 -432 368
WIRE -336 448 -336 528
WIRE -352 368 -336 368
WIRE -224 448 -240 448
WIRE -320 448 -336 448
WIRE -224 528 -240 528
WIRE -320 528 -336 528
WIRE -224 528 -224 448
WIRE 0 368 -16 368
WIRE -336 448 -336 368
WIRE -224 368 -224 448
WIRE -240 368 -224 368
WIRE -112 368 -96 368
WIRE -224 368 -192 368
WIRE -336 368 -320 368
WIRE -1424 128 -1392 128
WIRE -1312 128 -1280 128
WIRE -1200 128 -1168 128
WIRE -1424 368 -1392 368
WIRE -1312 368 -1280 368
WIRE -1200 368 -1168 368
WIRE -1424 624 -1392 624
WIRE -1312 624 -1280 624
WIRE -1200 624 -1168 624
WIRE -1424 -112 -1392 -112
WIRE -1312 -112 -1280 -112
WIRE -1200 -112 -1168 -112
WIRE -1168 448 -1168 464
WIRE -992 624 -960 624
WIRE -880 624 -864 624
WIRE -864 624 -848 624
WIRE -736 768 -736 736
WIRE -768 624 -752 624
WIRE -736 624 -736 656
WIRE -752 624 -736 624
FLAG -1024 -256 0
FLAG -304 32 0
FLAG -240 32 0
FLAG -160 32 0
FLAG -112 32 0
FLAG 48 32 0
FLAG -432 32 0
FLAG -352 32 0
FLAG 192 768 0
FLAG 128 768 0
FLAG -576 -112 Vs
IOPIN -576 -112 In
FLAG -976 -384 Vs
IOPIN -976 -384 Out
FLAG 128 272 0
FLAG -304 768 0
FLAG -240 768 0
FLAG -160 768 0
FLAG -112 768 0
FLAG 48 768 0
FLAG -432 768 0
FLAG -352 768 0
FLAG -576 624 Vs
IOPIN -576 624 In
FLAG -304 272 0
FLAG -240 272 0
FLAG -160 272 0
FLAG -112 272 0
FLAG 48 272 0
FLAG -432 272 0
FLAG -352 272 0
FLAG -576 128 Vs
IOPIN -576 128 In
FLAG -992 -112 Vs
IOPIN -992 -112 In
FLAG -736 -112 0
FLAG -992 368 Vs
IOPIN -992 368 In
FLAG -736 512 0
FLAG -864 368 3
FLAG -752 368 4
FLAG -992 128 Vs
IOPIN -992 128 In
FLAG -736 272 0
FLAG -864 128 1
FLAG -752 128 2
FLAG -576 368 Vs
IOPIN -576 368 In
FLAG 0 368 0
FLAG -1424 128 Vs
IOPIN -1424 128 In
FLAG -1168 128 0
FLAG -1424 368 Vs
IOPIN -1424 368 In
FLAG -1168 464 0
FLAG -1424 624 Vs
IOPIN -1424 624 In
FLAG -1168 624 0
FLAG -1424 -112 Vs
IOPIN -1424 -112 In
FLAG -1168 -112 0
FLAG -992 624 Vs
IOPIN -992 624 In
FLAG -736 768 0
FLAG -864 624 5
FLAG -752 624 6
SYMBOL g -304 -96 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName G11
SYMATTR Value 1
SYMBOL cap -256 -80 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 80 Left 0
SYMATTR InstName C11
SYMATTR Value {L}
SYMBOL e -112 -96 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName E11
SYMATTR Value 1
SYMBOL voltage -80 -112 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 Invisible 0
SYMATTR InstName V11
SYMATTR Value 0
SYMBOL f -432 -80 R0
WINDOW 0 16 0 Left 0
WINDOW 3 40 41 Left 0
WINDOW 123 16 80 Left 0
SYMATTR InstName F11
SYMATTR Value V11
SYMATTR Value2 1
SYMBOL voltage -1024 -368 R0
WINDOW 123 32 56 VTop 0
WINDOW 39 32 56 VTop 0
WINDOW 3 -32 144 Left 0
WINDOW 0 16 16 Left 0
SYMATTR Value PULSE(-1 1 1m .10u .10u 2m 4m)
SYMATTR InstName Vs
SYMBOL res 32 -96 R0
WINDOW 0 32 16 Left 0
WINDOW 3 32 96 Left 0
SYMATTR InstName R12
SYMATTR Value 1
SYMBOL diode 112 672 R0
WINDOW 0 32 -16 Left 0
WINDOW 3 32 64 Left 0
SYMATTR InstName D31
SYMATTR Value r
SYMBOL diode 176 736 M180
WINDOW 0 32 80 Left 0
WINDOW 3 32 0 Left 0
SYMATTR InstName D32
SYMATTR Value r
SYMBOL res -560 -96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R11
SYMATTR Value .5
SYMBOL Misc\\xvaristor 112 144 R0
SYMATTR InstName D21
SYMATTR Value s
SYMATTR Prefix D
SYMBOL g -304 144 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName G21
SYMATTR Value 1
SYMBOL cap -256 160 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 80 Left 0
SYMATTR InstName C21
SYMATTR Value {L}
SYMBOL e -112 144 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName E21
SYMATTR Value 1
SYMBOL voltage -80 128 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 Invisible 0
SYMATTR InstName V21
SYMATTR Value 0
SYMBOL f -432 160 R0
WINDOW 0 16 0 Left 0
WINDOW 3 40 41 Left 0
WINDOW 123 16 80 Left 0
SYMATTR InstName F21
SYMATTR Value V21
SYMATTR Value2 1
SYMBOL res 32 144 R0
WINDOW 0 32 16 Left 0
WINDOW 3 32 96 Left 0
SYMATTR InstName R22
SYMATTR Value 1
SYMBOL res -560 144 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R21
SYMATTR Value .5
SYMBOL g -304 640 R0
WINDOW 0 16 16 Left 0
WINDOW 3 16 96 Left 0
SYMATTR InstName G31
SYMATTR Value 1
SYMBOL cap -256 656 R0
WINDOW 0 32 0 Left 0
WINDOW 3 32 80 Left 0
SYMATTR InstName C31
SYMATTR Value {L}
SYMBOL e -112 640 R0
WINDOW 0 16 16 Left 0
WINDOW 3 13 96 Left 0
SYMATTR InstName E31
SYMATTR Value {.7/Is}
SYMBOL voltage -80 624 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 Invisible 0
SYMATTR InstName V31
SYMATTR Value 0
SYMBOL f -432 656 R0
WINDOW 0 16 0 Left 0
WINDOW 3 40 41 Left 0
WINDOW 123 13 80 Left 0
SYMATTR InstName F31
SYMATTR Value V31
SYMATTR Value2 {Is/.7}
SYMBOL res 32 640 R0
WINDOW 0 32 16 Left 0
WINDOW 3 32 96 Left 0
SYMATTR InstName R32
SYMATTR Value 1
SYMBOL res -560 640 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R31
SYMATTR Value .5
SYMBOL res -976 -96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value .5
SYMBOL ind2 -752 -96 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L1
SYMATTR Value {L}
SYMATTR Type ind
SYMBOL res -976 384 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R3
SYMATTR Value .5
SYMBOL ind2 -752 384 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L3
SYMATTR Value {L}
SYMATTR Type ind
SYMBOL bv -736 384 R0
WINDOW 0 16 16 Left 0
WINDOW 3 -16 104 Right 0
SYMATTR InstName B3
SYMATTR Value V=if(abs(I(L3))<Is,0,V(3,4)*(Ls/L-1))
SYMBOL res -976 144 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R2
SYMATTR Value .5
SYMBOL ind2 -752 144 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L2
SYMATTR Value {Ls}
SYMATTR Type ind
SYMBOL bv -736 144 R0
WINDOW 0 16 16 Left 0
WINDOW 3 -16 104 Right 0
SYMATTR InstName B2
SYMATTR Value V=if(abs(I(L2))>Is,0,V(1,2)*(L/Ls-1))
SYMBOL res -560 384 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R9
SYMATTR Value .5
SYMBOL ind2 -336 384 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L9s
SYMATTR Value {Ls}
SYMATTR Type ind
SYMBOL csw -320 448 R270
WINDOW 0 0 -32 VLeft 0
WINDOW 3 0 112 VRight 0
SYMATTR InstName W1
SYMATTR Value V1 s
SYMBOL voltage -208 368 M90
WINDOW 0 -32 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL csw -320 528 R270
WINDOW 0 0 -32 VLeft 0
WINDOW 3 0 112 VRight 0
SYMATTR InstName W2
SYMATTR Value V2 s
SYMBOL voltage 0 368 R90
WINDOW 0 -32 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName V2
SYMATTR Value 0
SYMBOL ind2 -224 384 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L9
SYMATTR Value {L-Ls}
SYMATTR Type ind
SYMBOL res -1408 144 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R6
SYMATTR Value .5
SYMBOL ind2 -1184 144 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 72 56 VCenter 0
SYMATTR InstName L6
SYMATTR Value Flux={L-Ls}*limit(x,{-Is},{Is})+{Ls}*x
SYMATTR Type ind
SYMBOL res -1408 384 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R7
SYMATTR Value .5
SYMBOL ind2 -1184 384 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 72 56 VCenter 0
SYMATTR InstName L7
SYMATTR Value Flux={(L-Ls)*Is}*pwrs(tanh(pwrs(x/{Is},{n})),{1/n})
SYMATTR Type ind
SYMBOL res -1408 640 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R8
SYMATTR Value .5
SYMBOL ind2 -1184 640 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 72 56 VCenter 0
SYMATTR InstName L8
SYMATTR Value Flux={L*Is*2/Pi}*atan(x/{Is*2/Pi})
SYMATTR Type ind
SYMBOL res -1408 -96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R5
SYMATTR Value .5
SYMBOL ind2 -1184 -96 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 72 55 VCenter 0
SYMATTR InstName L5
SYMATTR Value Flux={L}*x
SYMATTR Type ind
SYMBOL ind -1184 352 R0
SYMATTR InstName L7s
SYMATTR Value {Ls}
SYMBOL res -976 640 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R4
SYMATTR Value .5
SYMBOL ind2 -752 640 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L4
SYMATTR Value {Ls}
SYMATTR Type ind
SYMBOL bv -736 640 R0
WINDOW 0 16 16 Left 0
WINDOW 3 -16 104 Right 0
SYMATTR InstName B4
SYMATTR Value V=V(5,6)*(L/Ls-1)/(1+(I(L4)/Is)**6)
TEXT -1488 -384 Left 0 !.tran 0 44m 40m uic
TEXT -248 -192 VLeft 0 ;G11, C11, E11 models volt-\n seconds applied to inductor
TEXT -432 -192 VLeft 0 ;F11, V11 reflects current\n resulting from applied volt-sec
TEXT 56 -192 VLeft 0 ;R11 models linear inductance\n with unity gain: L = C11*R11
TEXT -56 -192 VLeft 0 ;V11 senses current drawn by\n applied volt-seconds
TEXT -224 -592 Bottom 0 ;Generalized Impedance Converter Based Linear Inductor Model
TEXT 32 568 Left 0 !.model r d(Rs={Ls/L}\n+ Is=3p)
TEXT -504 -192 VLeft 0 ;R11 models winding resistance
TEXT 32 320 Left 0 !.model s d(Ron={Ls/L}\n+ Vfwd={Is} Vrev={Is})
TEXT -128 488 Left 0 !.model s csw(Ron=1u It={Is})
TEXT -1056 -56 Left 0 ;No Saturation\n(standard inductor)
TEXT -648 -56 Left 0 ;No Saturation\n(linear inductor)
TEXT -1488 -328 Left 0 !.param L=1m Ls=10u Is=.7
TEXT -1056 184 Left 0 ;Hard Saturation\n(additive model)
TEXT -1056 424 Left 0 ;Hard Saturation\n(subtractive model)
TEXT -1488 -296 Left 0 ;L = unsaturated inductance\nLs= saturated inductance\nIs = saturation current
TEXT -648 184 Left 0 ;Hard Saturation\n(stepped model)
TEXT -648 424 Left 0 ;Hard Saturation\n(switched model)
TEXT -648 680 Left 0 ;Soft Saturation
TEXT -1488 184 Left 0 ;Hard Saturation\n(stepped model)
TEXT -1488 424 Left 0 ;Soft Saturation\n(adjustable hardness)
TEXT -1488 680 Left 0 ;Very Soft Saturation
TEXT -1488 -56 Left 0 ;No Saturation\n(arbitrary inductor model)
TEXT -1240 280 Center 0 ;Flux={L*Is}*tanh(x/{Is})
TEXT -1488 536 Left 0 ;Flux={L*Is}*pwrs({2/Pi}*atan({Pi/2}*pwrs(x/{Is},{n})),{1/n})
TEXT -1488 480 Left 0 !.param n=2
TEXT -1240 40 Center 0 ;Flux={L}*limit(x,{-Is},{Is})
TEXT -976 -320 Left 0 ;Test source for all\n inductor models
TEXT -1056 -600 Center 0 ;Various Approaches for Modeling Saturating Inductors\nby [email protected] - April 2004
TEXT -1472 -528 Left 0 ;This simulation explores the new arbitrary inductor model and compares \nit to other methods of modeling inductor saturation, such as the B-source \ninductance multiplier method, the generalized impedance converter \nmethod, and a method with current controlled switches.
TEXT -1056 680 Left 0 ;Soft Saturation\n(additive model)
LINE Normal -96 -144 -288 -144 2
LINE Normal -64 -128 -96 -144 2
LINE Normal -320 -128 -288 -144 2
LINE Normal -368 -80 -320 -128 2
LINE Normal -96 592 -288 592 2
LINE Normal -64 608 -96 592 2
LINE Normal -320 608 -288 592 2
LINE Normal -368 656 -320 608 2
LINE Normal -96 96 -288 96 2
LINE Normal -64 112 -96 96 2
LINE Normal -320 112 -288 96 2
LINE Normal -368 160 -320 112 2
LINE Normal -160 480 -80 400 2
LINE Normal -240 432 -208 416 2
LINE Normal -240 512 -160 480 2
LINE Normal -208 416 -192 400 2
RECTANGLE Normal -624 -416 -1488 -624
 
A

analog

Jan 1, 1970
0
analog said:
Using LTspice's new arbitrary inductor, a simple linear inductor may
be modeled as Phi=L*i or in LTspice terminology:

Flux = {L}*x ; (no saturation)
Note: L is the parametrized inductance and x is the current through L.

Simple hard saturation can be modeled with a limit function [and a]
residual saturated inductance can easily be added to the model:

Flux = {L-Ls}*limit(x,{-Is},{Is})+{Ls}*x ; (stepped saturation)
Note: Ls is the parametrized saturation inductance [and Is is the
parametrized saturation current.]

For a very soft characteristic, use the arc tangent function:

Flux = {L*Is*2/Pi}*atan(x/{Is*2/Pi}) ; (very soft saturation)
Note: Ls is not really needed due to the very soft nature of atan.

A circuit file, saturating_inductor.asc, demonstrating these
techniques and more may be found in the files section of this Yahoo
Group under "adventures with analog". This file explores LTspice's
new arbitrary inductor model and compares it to other methods of
modeling inductor saturation, such as the B-source inductance
multiplier method, the generalized impedance converter method, and
a method with current controlled switches. -- analogspiceman

Some comparative run times from testing various inductor models:

1.0 Standard L ; plain vanilla: no added parasitics
1.4 Arbitrary L ; linear: Flux=L*x
2.5 Arbitrary L ; limit: Flux={L-Ls}*limit(x,{-Is},{Is})+{Ls}*x)
2.9 Arbitrary L ; atan: Flux={L*Is*2/Pi}*atan(x/{Is*2/Pi}))
3.1 Hysteresis L ; Hc=16 Bs=.44 Br=.16 A=10u Lm=10m Lg=1.1m N=30
6.0 B source + L ; B: V=if(abs(I(L))<Is,0,V(L)*(Ls/L-1))
7.6 GIC Hysteresis L ; my prototype macro model

The method I used was to set up an R-L test circuit that only saved
plot data for the last 0.2 percent of the run and took about 2-10
seconds to run depending on model type (all set up to model 10uH).
Maximum timestep was set to force at least 100k data points during
the run. Signal levels were set well below saturation to compare
the run time of the various models within their linear regions only.
The two models with hysteresis were set up with relatively large air
gaps to avoid incurring extra data points due to that nonlinear
effect. As much as possible this was to be an apples to apples
comparison.

Each model was run several times noting the shortest run time (least
pollution from background PC tasks). Finally the same thing was done
with no inductor at all (just an R from source to ground) to deter-
mine just how much of the run time was attributable to everything
but the inductor. This offset was subtracted from all the individual
totals to get at the relative run times of the various models.

Which model should you use?

Obviously each layer of complexity adds additional run time, but
if a circuit has only one or a few nonlinear inductors the choice
of model probably won't have much impact on overall run time in a
typical power supply simulation.

My advice would be to stick with the standard inductor whenever
possible, but go to the flux defined arbitrary inductor to model
saturation effects where hysteresis is unimportant. This model type
defines saturation in terms of inductor current rather than in the
more difficult to use core parameters.

The new arbitrary inductor hysteresis model can go from very soft
to very square and it captures the behavior of minor loops (their
slopes respond properly to various dc biases). But to model certain
additional effects, such as a hysteresis loop that widens at high
frequencies or to independently specify the squareness and zero
crossing slope of the hysteresis loop probably would require the
use of a macro model. (These two model properties help in building
a model with core losses as arbitrary functions of f and Bm.)

analog
 
P

Paul Hovnanian P.E.

Jan 1, 1970
0
Mike said:
Analog,
A circuit simulator oriented toward switching power
conversion cannot be considered complete without a non-
linear inductor model as part of the package. This is
absolutely vital for simulating the mundane such as
variations in core loss with operating conditions as well
as the more exotic such as magamps and ferroresonant
transformers[...]

It was hard to justify adding a new native SPICE device for non-
linear inductors to LTspice for SMPS's because the non-linear
properties of the magnetic material usually don't need to be
simulated(outside of magamps and core oscillators which don't
commercially interest me). It's sort of like wanting all your
power FETs to breakdown in simulation if they're over-voltaged.
My own preferred practice is to have power FET's that don't
break down at any voltage in simulation and then, after the
thing works in simulation, check that the FET's aren't over-
voltaged. Similarity for inductors, it's much more practical
to simulate with linear inductors and then check at the end if
inductors I want to use lose differential inductance due to peak
currents moving the cores toward saturation. After all, since
saturation flux density goes down monotonically with temperature,
when simulating a typical case in the middle of the service
temp range, the magnetics had better look perfectly linear.
Also, core losses are usually dominated by linear effects.
Hysteric loss; i.e., the area opened by the B-H curve times the
core volume times the frequency; basically vanishes in comparison
when you step back from saturation.

This philosophy might work well with small signal magnetics where the
cost of providing a safety margin between the operating point and the
onset of nonlinearity isn't significant. But in power electronics this
margin can be quite expensive in terms of larger and heavier magnetics.

There are also cases in which a circuit operates in nonlinear regions
under abnormal input conditions and the answer one gets from a linear
model differ significantly from reality. Problems with resonances
between shunt capacitor banks and distribution substation transformers
come to mind as one example. Of course, this isn't your typical spice
problem, what with 25 MVA, 230 KV transformers.
 
K

Kevin Aylward

Jan 1, 1970
0
analog said:
Mike Engelhardt wrote:

Can't seem to find the original post of Mikes, so I am responding here.

Its not quite the same, imo. It is nice to have the simulation have
inductor current parabolic-ing up so that you know you are saturating
the core. The analogy is more like amplifier clipping simulation, which
is useful. For example the well known issue of flux imbalance is a good
target for the use of good non-linear core models.

As noted, its something I have been wanting to have a go at for some
time, but never got the motivation until this was pointed out.
"Nonlinear transformer model for circuit simulation"
Chan, J.H.; Vladimirescu, A.; Gao, X.-C.; Liebmann, P.; Valainis, J.
Computer-Aided Design of Integrated Circuits and Systems,
IEEE Transactions on, Vol.10, Iss.4, Apr 1991; Pages:476-482

Ok. Now the meat.

I ran a simple circuit LR in LTSpice:

***********
Version 4
SHEET 1 880 680
WIRE -208 144 -352 144
WIRE -128 144 -48 144
WIRE -48 144 -48 176
WIRE -48 256 -48 288
WIRE -48 288 -224 288
WIRE -352 288 -352 224
WIRE -224 288 -352 288
FLAG -224 288 0
SYMBOL ind -64 160 R0
SYMATTR InstName L1
SYMATTR Value Hc=100 Br=250m Bs=300m a=1 lm=1 n=1 lg=0
SYMBOL res -112 128 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value .1
SYMBOL voltage -352 128 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 1 0.2 2 -0.2 3 0.2 4 -0.2)
TEXT -352 368 Left 0 !.probe
TEXT -352 408 Left 0 !.tran 0 4 0 1
***********

It doesn't show any non-linear *curves*. Only straight lines, therefore
how can it be implementing the above referanced equations?

Graphs:

LT graph for the above - http://www.anasoft.co.uk/LTInductor.gif
SS graph http://www.anasoft.co.uk/SSInductor.gif

SS general BH loop test graph http://www.anasoft.co.uk/ssbhtest.gif


What dose seem to be at issue though, is that the basic Chan model is
flawed. Maybe LTSpice can handle it ok, but XSpice has fundamental
problems in handling the inherent discontinuities of the model. That is,
the model proposes a *symmetrical* shape loop, even when driving
asymmetric currents. This results in curves that can intersect at almost
at right angles, i.e. when one loop starts to re-follow the (B+ + B-)/2
curve, the derivatives changes significantly, causing the inductor to
generate a step voltage change. A real core cannot possible do this when
driven by a sine wave. Even if LTSpice got a convergence, the results
would not reflect what a real core will do.

The curves really need to be modified so that the curves join smoothly,
i.e. start moving in to the average curve much sooner. I have done a
little hard code test that seems to imply this can be done by modifying
both the H offset and Bd values, but I have not looked at a general way
to do this yet.

I have also been looking at some sort of modification to:

B = a.B+ + (1-a)B-

As this gets the extreme cases and average case in one expression.

Any thoughts? Is the linear approx which seems to be in LTSpice due to
the convergence issues I am seeing.

Oh..although XSpice claimed to have a hysterics core model, it is a lie.
The model acts as a Schmitt, i.e. the output values are clamped, making
it, essentially useless. But, here's a good one...

In the XSpice magnetic core code, this was called in every *iteration*

*******************
// Allocate storage for breakpoint domain & range values
H = (double *) calloc(size, sizeof(double));
if (H == '\0') {
cm_message_send(allocation_error);
return;
}
B = (double *) calloc(size, sizeof(double));
if (B == '\0') {
cm_message_send(allocation_error);
return;
}
***********

But it was worst then this:) There wasn't even a free() in the routine.

Kevin Aylward
[email protected]
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.
 
F

Fred Bartoli

Jan 1, 1970
0
Kevin Aylward said:
analog wrote:

Oh..although XSpice claimed to have a hysterics core model, it is a lie.
The model acts as a Schmitt, i.e. the output values are clamped, making
it, essentially useless. But, here's a good one...

In the XSpice magnetic core code, this was called in every *iteration*

*******************
// Allocate storage for breakpoint domain & range values
H = (double *) calloc(size, sizeof(double));
if (H == '\0') {
cm_message_send(allocation_error);
return;
}
B = (double *) calloc(size, sizeof(double));
if (B == '\0') {
cm_message_send(allocation_error);
return;
}
***********

But it was worst then this:) There wasn't even a free() in the routine.


So what ? Hysteresis is simply modeled at the OS level :)

Fred.
 
W

Winfield Hill

Jan 1, 1970
0
Fred Bartoli wrote...
So what? Hysteresis is simply modeled at the OS level :)

As in, program crashed = off state?


Thanks,
- Win

whill_at_picovolt-dot-com (use hill_at_rowland-dot-org for now)
 
M

Mike Engelhardt

Jan 1, 1970
0
Kevin,

As the night follows the day, here comes Kevin.
...It doesn't show any non-linear *curves*. Only straight lines,
therefore how can it be implementing the above referanced equations?

Because your example is broken in that it goes from unsaturated to
saturated so fast, you can't see the curves. You can see curves
if you reduce the time step size and zoom in. There's some examples
in the help file, as there were in the original post. Here's deck
with a parallel current source and inductor. The current source
gives a unity dI/dT, so you can read out the inductance as a function
of current as the voltage on node n001:

*
L1 N001 0 Hc=16. Bs=.44 Br=.10
+ A=0.000005 Lm=0.002 Lg=0.00011 N=1000
I1 0 N001 PWL(0 0 1 1)
..tran .1
..options plotwinsize=0
..end

In the above deck, the initial magnetization curve is followed,
so you see first an increase in L as the current increases and
then later is saturates.
What dose seem to be at issue though, is that the basic Chan
model is flawed. Maybe LTSpice can handle it ok, but XSpice
has fundamental problems in handling the inherent
discontinuities of the model.

No, that certainly is not a flaw in the Chan et al model. When
a inductor with a magnetic core is transversing a minor B-H
loop, the inductance changes with a discontinuity then H reverses.
This is true for any minor loop, both symmetric and asymmetric.
The corners of the football shape are as pointy as I can measure.
BTW, if you read the article, the Chan model was proposed in order
to remove discontinuities of the previous Jiles-Atherton model
used in PSpice. Yes, I did have to write an integration algorithm
for this project for LTspice that would handle the discontinuity.
But the discontinuity in inductance is physical and the correct
solution does not show spikes. See the LTspice help section
LTspice=>Circuit Elements=>L. Inductor of the current release for
more information.
Oh..although XSpice claimed to have a hysterics core model, it is
a lie. The model acts as a Schmitt, i.e. the output values are
clamped, making it, essentially useless.

Good ferromagnetic core simulation is all but unheard of. The
Chan model was introduced for a specialty simulator, DSPICE of
Daisy Corp. locally here in Sunnyvale, CA. and has been copied
into a few other high-end SPICE programs. However, I've seen
it copied with gross errors. For example, the hard part is the
gap solution. Chan writes an equation for B(H) but when there's
a gap, you don't know H, either. Well, there's an equation for
H but that includes the permeability, which isn't known until H
is known. The math is simple enough to solve, but, with the
integration algorithm development, was the hardest part to
implement. The point of the deck I post above is that the gap
solution is correct.

For further info, there was also a discussion of LTspice's non-
linear inductors in the independent users' group on Yahoo.

--Mike
 
R

R.Legg

Jan 1, 1970
0
analog said:
The following circuit file demonstrates these techniques and more.
This file explores LTspice's new arbitrary inductor model and
compares it to other methods of modeling inductor saturation, such
as the B-source inductance multiplier method, the generalized
impedance converter method, and a method with current controlled
switches.

~~~saturating_inductor.asc~~~ (beware unintended word wrap)

Can you explain the anomalous behaviour illustrated in the waveform of
I(R9) in the first 12mSec of this simulation?

There seems to be a polarized irregularity as well, in the same
waveform, with asymmetrical saturation delays or volt-seconds, in
later circuit 'equilibrium'.

RL
 
A

analog

Jan 1, 1970
0
R.Legg said:
Can you explain the anomalous behaviour illustrated in the waveform
of I(R9) in the first 12mSec of this simulation?

It is a start up transient due to the first partial cycle not being
quite the right length to enter the next cycle with no net per-cycle
dc.
There seems to be a polarized irregularity as well, in the same
waveform, with asymmetrical saturation delays or volt-seconds, in
later circuit 'equilibrium'.

The start up transient has decayed over many time constants and is
practically gone. The volts-seconds look balanced to me. Might I
suggest turning off waveform compression and setting the minimum step
size to 10u? -- analog
 
A

analog

Jan 1, 1970
0
Mike said:
No, that certainly is not a flaw in the Chan et al model. When
a inductor with a magnetic core is transversing a minor B-H
loop, the inductance changes with a discontinuity then H reverses.
This is true for any minor loop, both symmetric and asymmetric.
The corners of the football shape are as pointy as I can measure.
BTW, if you read the article, the Chan model was proposed in order
to remove discontinuities of the previous Jiles-Atherton model
used in PSpice.

Hi Mike,

Chan's modeling approach seems to be fundamentally different than
most of the other methods. Chan's approach more or less starts with
positive and negative saturation curves and that are piecewise summed
and/or offset to map out a B-H trajectory. This seems to lead to
smooth curves with a minimum of computational overhead. Most of the
other methods seem to start with an anhysteretic B-H curve and add
in hysteresis as a correction term.

The (small) problem I see with the Chan method is that the basic
curve shape is defined by the major, fully saturated loop and the
minor loops must be built up from pieces taken from the two major
boundary curves. This can lead to some non realistic seeming
behavior with erratic or aperiodic loop trajectories.

The inline asc file at the end of this post demonstrates just such a
case where the B-H trajectory violates the supposedly hard, defining
boundaries of the major loop. Also there is an unrealistically sharp
bend where this particular wayward trajectory returns to the straight
and narrow. However, these slight B-H loop idiosyncrasies probably
are immaterial to simulating more-than-realistic-enough behavior back
over in the electrical domain.

Best regards -- analog

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 4
SHEET 1 880 680
WIRE -208 144 -176 144
WIRE -176 144 -176 176
WIRE -176 256 -176 288
WIRE -352 288 -352 256
WIRE -288 144 -320 144
WIRE -352 144 -352 176
WIRE -320 144 -352 144
WIRE -176 144 -144 144
WIRE -112 144 -112 192
WIRE -112 240 -112 288
WIRE -64 288 -64 256
WIRE -64 176 -64 144
WIRE -64 144 -16 144
WIRE 32 144 32 192
WIRE 32 256 32 288
WIRE -16 144 32 144
WIRE -144 144 -112 144
FLAG -352 288 0
FLAG -176 288 0
FLAG -320 144 1
FLAG -144 144 2
FLAG -112 288 0
FLAG -64 288 0
FLAG 32 288 0
FLAG -16 144 3
SYMBOL ind2 -192 160 R0
WINDOW 3 -32 176 Left 0
SYMATTR Value Hc=100 Br=250m Bs=300m a=.1u lm=50m n=1 lg=0
SYMATTR InstName L1
SYMATTR Type ind
SYMBOL res -304 160 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL voltage -352 160 R0
WINDOW 3 -48 -80 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PWL(0 0 .3 4.5 .4 -1 1 20 2 -40 3 40 4 -40)
SYMATTR InstName V1
SYMBOL g -64 160 R0
SYMATTR InstName G1
SYMATTR Value 1
SYMBOL cap 16 192 R0
SYMATTR InstName C1
SYMATTR Value 1
TEXT -400 336 Left 0 !.tran 0 4 0 1m
TEXT -64 32 Center 0 ;Note: for B-H style curves plot V(3) against I(L1)
 
L

legg

Jan 1, 1970
0
It is a start up transient due to the first partial cycle not being
quite the right length to enter the next cycle with no net per-cycle
dc.


The start up transient has decayed over many time constants and is
practically gone. The volts-seconds look balanced to me. Might I
suggest turning off waveform compression and setting the minimum step
size to 10u? -- analog

Disabling compression works on the long term imbalance and reduces the
early anomally by some orders of magnitude. I don't see a minimum
time-step option however, only maximum time-step.

RL
 
A

analog

Jan 1, 1970
0
R.Legg said:
Disabling compression works on the long term imbalance and reduces the
early anomally by some orders of magnitude. I don't see a minimum
time-step option however, only maximum time-step.

Look harder until your synapses cross and you'll see it (it just looks
like it's spelled "maximum"). -- analog
 
L

legg

Jan 1, 1970
0
The start up transient has decayed over many time constants and is
practically gone. The volts-seconds look balanced to me. Might I
suggest turning off waveform compression and setting the minimum step
size to 10u? -- analog

Actually, this 'fix' seems non-reversible.

Re-establishing the previous compression settings does not produce the
original anomalous amplitudes, nor does it restore the longer term
imbalance.

Looking closely at the record, there were two possible early effects -
one with the disturbance in the opposing polarities in the same period
(separated by 1/2 cycle), the other with the early disturbance on
opposing polarities of succeeding periods (separated by 1.5 cycles).

I think this is a new beef, but with who or what, I'm unsure. Is this
nit-picking, or should a model with the repeated settings be
repeatable and should reversible settings produce reversible results?
(At least..... within the same bifurcation.)

RL
 
L

legg

Jan 1, 1970
0
Look harder until your synapses cross and you'll see it (it just looks
like it's spelled "maximum"). -- analog

The synapses see maximum in two setting control locations, in the
syntax explanation, and in the help files.

Setting the maximum tme-step to 10u gives a different (but also
symmetrical) result than the previous fix, and eliminates the early
anomaly altogether.

This IS reversible (ie betwen the two different symmetries) and the
early anomaly can also be re-established. Asymmetry in the steady
state is not reproducible.

RL
 
K

Kevin Aylward

Jan 1, 1970
0
Mike said:
Kevin,

As the night follows the day, here comes Kevin.


Because your example is broken

Yeah. It looks like I didn't translate the set-up correctly. I am not
an expert in running LTSpice. I seem to be able to get the basic curves
to look simular now.
No, that certainly is not a flaw in the Chan et al model.

Ahmmm... well maybe its a flaw in explaining the model implementation.
When
a inductor with a magnetic core is transversing a minor B-H
loop, the inductance changes with a discontinuity then H reverses.

Yes, if the input changes discontinuously. However, if the input changes
*smoothly* and very slowly, i.e. as in a slow sinewave, there should be
no hard switch in inductance. It should behave something like like it is
coming out of transistor saturation.

I had a look at the corrected circuit, and LTSpice seems to be handling
this ok, with no jumps. What did you do to achieve this?, as I note
below.
This is true for any minor loop, both symmetric and asymmetric.
The corners of the football shape are as pointy as I can measure.

You missed my point. Forget the turn around point itself due to time
changes, this is sort of a different issue, anyway, if you use a sine
wave, this can't possible happen. Physical reality does not do this.
Consider a repeating minor loop finally hitting the average curve and
*continuing* on to that average curve. The slope of the average curve
should be the same as the B_+ or B_- curve at that point.
BTW, if you read the article,

I have. Spent several days on it. Its explanation is dreadful. It gives
no explicit details, only general guidelines.
the Chan model was proposed in order
to remove discontinuities of the previous Jiles-Atherton model
used in PSpice.

Yes I did read this, but the plots and description dont seem to tie up.
Its very vague. There is only one degree of freedom for the simple
symmetrical loops at the change point, as I read it. This is set, up
(Bd) to make the curve continuous at change over. That is:

B = B_- + Bd = B = B_+ - Bd

How can this automatically make the join up with the average curve have
the same slope as well? After a turn around the curve heads up to an
intersection with the average curve. This intersection dose not
intersect smoothly. This is clear because if you dont switch the curve
to let it follow the average curve, it keeps heading upwards, above what
the average says it should be. The physical proof is simply to let it
happen and look at the graph.

Mathematical proof:

Consider a turnaround point on a symetrical loop, curve going up:

consider B = B_- + Bd

Bd chosen so that B matches up the values of B at the bottom turn
around. In this case H is not offset in the paper. Now calculate the
derivative dB/dH at the top intersection of B = (B_- + B_)/2 and the
derivative of B = B_- + Bd. They don't match.

Now...this may be well be where the paper is cryptic, to say the least.
Fig. 2 of the paper does seem to show that the minor loop joins up with
the average curve smoothly, however, other than "...is a valid extension
of a minor loop..." it explains nothing else about constructing such a
curve. It does imply that H is not offset, because it is not mentioned
here, but is mentioned in the asymmetrical loop, but for a different
reason. In fact, if you look at Fig.3 for the asymmetrical case, how can
the curve that connects D to D' possibly have the same slope as the
magnetisation curve at C?

Without offsetting h, I calculate points E and F (Fig.2, case 1) (via a
quadratic) so that the curve hits D. This results in the intersection at
F not having the same slope as the average magnetisation curve at that
point.

So, whats the deal here. Is H supposed to offset as well as B?
Yes, I did have to write an integration algorithm
for this project for LTspice that would handle the discontinuity.

Again, I agree there is a discontinuity in the *time* *derivative* if
you use a discontinuity in the input time response. The point I am
making is that if you use a smooth, very slow input, one would expect a
smooth change over from the up and down curves and average curves. That
is, dB/dH should be continuous, if the input has continuous derivatives.
True, I admit I have not made such a measurement, but excluding, QM, the
real world usually has continuous derivatives.
But the discontinuity in inductance is physical and the correct
solution does not show spikes.

This is actually a bit subtle. One has to separate discontinuities due
to time and those due to transfer characteristics.

Since V=d(flux)/dt = di/dt.d(flux)/di

If L=d(flux)/di is discontinuous, so will V be, *irrespective* of t,
(ignoring special limiting functions). So, in this sense, inductance
cannot be discontinuous.

So, I agree, the correct solution should not show a spike, because
L=d(flux)/di should be continuous, but I don't agree that L itself is
discontinuous. The flux/I graph should always have continuous
derivatives in the physical world.

How does you implementation overcome/is consistent with, the math I
posted above, since LTSpice doesn't appear to show any spikes? It would
certainly be embarrassing for me to make a simple math mistake.

See the LTspice help section
LTspice=>Circuit Elements=>L. Inductor of the current release for
more information.


Good ferromagnetic core simulation is all but unheard of.

No surprising with the dreadful description in the Chan paper.
The
Chan model was introduced for a specialty simulator, DSPICE of
Daisy Corp. locally here in Sunnyvale, CA. and has been copied
into a few other high-end SPICE programs.

Well, if I can get this glitch sorted out, it will be in a low end
simulator as well:)
However, I've seen
it copied with gross errors. For example, the hard part is the
gap solution. Chan writes an equation for B(H) but when there's
a gap, you don't know H, either. Well, there's an equation for
H but that includes the permeability, which isn't known until H
is known.

Yes. I have had a little look at this, and came to the conclusion that
there was a bit more work required to add the gap in. Yeah, the mu
varies with H.
The math is simple enough to solve, but, with the
integration algorithm development, was the hardest part to
implement.

Not clear on what you are saying here. I haven't looked at the full
details of developing an explicit formula for u as a function of I, but
even if it is transcendental, one can write a little iterative function
to solve it.

Kevin Aylward
[email protected]
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.
 
Top