The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 2:02pm
Pages: 1
Send Topic Print
Minor glitches in nonlinear magnetics paper (Read 4808 times)
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Minor glitches in nonlinear magnetics paper
Sep 19th, 2017, 7:54am
 
Hi -
I'm reading through the paper on this site about modeling nonlinear magnetics: http://www.designers-guide.org/Modeling/mag.pdf
and I've noticed a few glitches.

In listing 2, for the winding, the electrical terminals are declared as ep, en, but then one of the lines in the module has
 V(ep,e2) <+ turns * (r*I(ep,en) - ddt(Phi(mp,mn)));
Obviously, that "e2" should be "en"

Then, comparing Figure 2 to Listing 4, the topology is the same, but the elements have been renamed: gaps G1 and G2 in the figure are named G2 and G4 in the Spectre netlist; windings W3 and W4 in the figure are named W3b and W3a (respectively) in the netlist.

Finally, where I'm stumped, is that Figure 5 purports to show results from simulating Listing 4. However, the plot shows a node voltage "n4" but there is no "n4" in the netlist, and while there is an "e4", it's not listed on the "save" line, so I woudn't expect to be able to plot it.

Has anyone reproduced the plot in figure 5?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #1 - Sep 19th, 2017, 8:50am
 
Also, all three Verilog-A models are missing port direction declarations:
Code:
inout p, n; 

for gap and core
Code:
inout ep, en, mp, mn; 

for winding
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Minor glitches in nonlinear magnetics paper
Reply #2 - Sep 20th, 2017, 1:39am
 
In Verilog-A the port directions are effectively just comments. The simulator itself ignores the directions you specify. Port directions only become significant in Verilog-AMS when it comes time to insert connect modules.

I think the netlist is not used to generate Figure 5. Instead, I think it is intended to produce something similar Figure 4. I infer that from the PWL source and the polynomial controlled source that are used to create a stimulus whose amplitude varies over time. But Figure 4 is just a cartoon, not real simulation results. I believe the netlist in the paper may not correspond to any of the results given in the paper.

-Ken

Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #3 - Sep 20th, 2017, 6:05am
 
Ken Kundert wrote on Sep 20th, 2017, 1:39am:
In Verilog-A the port directions are effectively just comments.


One commercial simulator I used (maybe the same one you're familiar with) complained about a module that had "electrical p,n;" before "inout p,n;"

   WARNING (VACOMP-1146): "core.va", line 12: (Non-portable Syntax) [VENDOR] strongly recommends putting the direction specifier for
       port `p' before declaring its discipline.


It would be nice to be able to reproduce Figure 4. One might need to declare B and H as output variables (with the (* desc="" *) attribute), though some simulators will give access to all variables declared at module scope.

The plots in the ISCAS'95 to seem to correspond to the netlist in that paper; I even get a hysteresis curve when plotting B versus H.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #4 - Sep 20th, 2017, 6:14am
 
The loops aren't as nicely spaced as in Figure 4, but the general idea is there.
Back to top
 

mag.jpg

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #5 - Sep 20th, 2017, 6:25am
 
Wow! The simulator suggested using "method=trap" (it said it had detected trapezoidal ringing -- I would have expected it to tell me to us method=gear to avoid trapezoidal ringing, so I just ignored it at first). When I took the suggestion, the curves got a lot nicer!
Back to top
 

mag2.jpg

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #6 - Jan 14th, 2022, 12:02pm
 
I'm playing with these models again, and it's too bad there aren't units specified for any of the parameters:

module core(p,n);

magnetic p, n;
parameter real len=0.1 from (0:1000);   // effective magnetic length of core
parameter real area=1 from (0:inf);     // magnetic cross-sectional area of core
parameter real ms=1.6M from (0:inf);    // saturation magnetization


Spectre now has built-in components for "core" and "winding" and I noticed that area and len are in cm^2 and cm, respectively, for the built-in.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Minor glitches in nonlinear magnetics paper
Reply #7 - Jan 15th, 2022, 11:12pm
 
Indeed.  That is very sloppy. Sorry about that.  The funny thing is that these days I am kind of a fanatic about units.

It would probably be pretty easy to figure out what the units are for the linear components.  But the nonlinear core model has a different heritage.  It would not surprise me if the units between the two did not agree.  The nonlinear core model is based on the paper by Jiles and Atherton.  It was enhanced by Mark Williams during a Master's project.  I think Mark was pretty careful about make sure things agreed with the original paper. Perhaps you can find the units in that paper.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Minor glitches in nonlinear magnetics paper
Reply #8 - Jan 15th, 2022, 11:20pm
 
The first core and winding models in Spectre pre-dated Verilog-A, and I think they were purely linear.  When Mark joined the team we added the nonlinear core model in Spectre and created Verilog-A version of all the magnetic models and wrote the paper at roughly the same time. At least that is the way I remember it, but that was a long time ago.  Anyway, all that probably suggests that the units you found in the Spectre documentation are probably the right ones.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #9 - Jan 25th, 2022, 1:24pm
 
The models in Spectre differ from the ones in the paper: not least in that the parameters of the core are things like
 Br - residual flux density, in gauss
 Bm - saturation flux density, in gauss
 Hc - coercive magnetizing force in oersteds
instead of the alpha, ms, k, a that are parameters of the core model in the paper. The Spectre core model parameters look kind of like the LTspice parameters Br, Bs, Hc (respectively), but look out! because LTspice uses Tesla, Tesla, and Amp-turns/meter for the units. Also, LTspice uses meters, whereas Spectre uses cm for the geometric parameters.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Minor glitches in nonlinear magnetics paper
Reply #10 - Jan 25th, 2022, 2:22pm
 
There's a nice demo at Wolfram:
 http://demonstrations.wolfram.com/JilesAthertonModelOfMagneticHysteresis/
which includes units for the Jiles-Atherton parameters:
ms in A/m
a in A/m
k in A/m
c and alpha are dimensionless
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.