The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> Minor glitches in nonlinear magnetics paper
https://designers-guide.org/forum/YaBB.pl?num=1505832899

Message started by Geoffrey_Coram on Sep 19th, 2017, 7:54am

Title: Minor glitches in nonlinear magnetics paper
Post by Geoffrey_Coram on 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?

Title: Re: Minor glitches in nonlinear magnetics paper
Post by Geoffrey_Coram on 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

Title: Re: Minor glitches in nonlinear magnetics paper
Post by Ken Kundert on 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


Title: Re: Minor glitches in nonlinear magnetics paper
Post by Geoffrey_Coram on 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.

Title: Re: Minor glitches in nonlinear magnetics paper
Post by Geoffrey_Coram on Sep 20th, 2017, 6:14am

The loops aren't as nicely spaced as in Figure 4, but the general idea is there.

Title: Re: Minor glitches in nonlinear magnetics paper
Post by Geoffrey_Coram on 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!

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.