Author Topic: Spice, How to change inductance based on frequency???.....  (Read 6345 times)

0 Members and 1 Guest are viewing this topic.

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
I have a real inductor I'm working with on the bench where the inductance drops off at higher frequencies.  I'm looking to do some LTSpice simulations and I need something that models this drop in inductance with frequency.  I would think this would be pretty common, but I didn't see any built in stuff.  What am I missing?  Is there an easy way to model this?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #1 on: May 26, 2018, 01:11:01 pm »
DON'T use a frequency-dependent inductor... you can create such an element easily in SPICE, but that doesn't mean you've modeled a real component.

Do you have a plot of Z(F), preferably including Re and Im parts?

The best method is to curve-fit with RLC components.  As an approximation, accuracy goes up with order.  Use as many components as you like.  First-order is R+L, second order puts an R+C across that, 3rd order puts more R+L in series (representing skin effect) and R+L+C in parallel (representing core loss, stray capacitance and so on).

If you have a graph of impedance, you can even superimpose it over this or this,
https://www.seventransistorlabs.com/Calc/Filter1~.html
https://www.seventransistorlabs.com/Calc/Coilcraft1.html

The one probably being easier because of the fixed axes, but you have to mouse-over and poke at the circuit elements, to get the equivalent circuit.

The filter calculator works with a two-port.  To make a one-port (a two-terminal component), set the far source to zero ohms, zero volts/amps, and plot input impedance.

The Coilcraft calculator is streamlined for building equivalents to Coilcraft's own model (which, by the way, uses nonphysical components!), but the model is quite effective for modeling many inductors, and as long as you can compare the graph, you can tweak it to suit new components.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline CopperCone

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • *knock knock*
Re: Spice, How to change inductance based on frequency???.....
« Reply #2 on: May 26, 2018, 04:24:23 pm »
there are little faster then light contractors in the inductor with little saws and welders that change its inductance based on the frequency they hear with their super ears
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #3 on: May 26, 2018, 06:56:56 pm »
there are little faster then light contractors in the inductor with little saws and welders that change its inductance based on the frequency they hear with their super ears

I knew it!
Thanks T3.  That's the right track.  I'll see how it comes out that way and if I can get a good approximation.
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 1928
  • Country: us
    • The Messy Basement
Re: Spice, How to change inductance based on frequency???.....
« Reply #4 on: May 26, 2018, 09:28:23 pm »
I think the same problem exists with capacitors. Even if the value is fairly stable, the losses change with frequency. There have been posts (diyAudio perhaps?) on fixing that, and at least one commercial capacitor company produced correct models for their parts.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #5 on: May 26, 2018, 11:23:22 pm »
If you want to investigate this on a visceral time scale, look at supercaps.  Whereas dielectric absorption in most types is modeled as a large value R+C across the capacitor, these exhibit ionic diffusion (because of the porous electrode structure -- activated carbon).  This is equivalent to skin effect in inductors* (which is modeled in the second link I gave), and accounts for a sizable spread in apparent capacitance, depending on just what time scale you're measuring it on: from seconds to days!

*And in turn, if you'd like a visceral demonstration of this, locate a thick pipe or heavy block of copper, and drop a strong (NdFeB) magnet through it.  The frictional force is not quite proportional to rate, because the magnetic field penetrates deeper when it moves slower.  It's more like sqrt(rate).  You'd have to measure it with instruments to prove it, though.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #7 on: June 06, 2018, 12:18:07 am »
After playing with the CoilCraft models section: https://www.coilcraft.com/modelsltpice.cfm
...I was a little surprised they made you recreate the LTSpice schematic based on a screen shot... So I figured I'd post the .asc here in case anyone was interested and didn't want to have to transcribe. 

Just pull up the PDF for the part you want to simulate and drop in the "K" variables and set the fixed resistor and cap values from the table.

Enjoy!
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #8 on: June 06, 2018, 12:21:55 am »
One thing they don't mention is the effect of each K variable.  I'm sure you can figured it out based on the equations, but I would think there would be a procedure such as:
1) If you want faster roll off, then change this variable.
2) If you want higher bandwidth, change this variables..
etc..
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Spice, How to change inductance based on frequency???.....
« Reply #9 on: June 06, 2018, 08:53:50 am »
.
« Last Edit: August 19, 2022, 01:51:09 pm by emece67 »
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #10 on: June 06, 2018, 06:06:52 pm »
That's exactly what the coilcraft model is doing.  It's series/parallel G devices with various Laplace equations...

It's the Laplace equations and their effect that I don't understand well.
I have a table of inductances and other measurements (Q, theta, D, etc) taken from the actual inductor at increasing frequencies.  I don't understand what I need to tweak in the model to try to match the data to the model.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #11 on: June 06, 2018, 07:26:42 pm »
Note that those models are USELESS for transient simulation.

Paste the data into my model converter, and use that.  Make adjustments as needed.  The output is a 3f5-compatible SPICE model, follow standard procedure for whatever platform you're using. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Spice, How to change inductance based on frequency???.....
« Reply #12 on: June 06, 2018, 08:50:18 pm »
.
« Last Edit: August 19, 2022, 01:51:17 pm by emece67 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #13 on: June 06, 2018, 08:52:46 pm »
In what?

I tested it in LTSpice IV and it crawled horribly.  Most platforms completely ignore the LAPLACE block in transient (most XSPICE based ones).

To,
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #14 on: June 06, 2018, 09:39:48 pm »
I'm primarily interested in AC analysis so I don't think I'll run into those issues with the G models.
I did play with your web tools, but I have the same problem with both systems that there isn't any instruction on what K parameters have what effect on the model.  I would be blindly entering values at this point.
I'm looking for a response that starts out at about 200uH, stays mostly flat out to 10kHz, then rolls off to about 60uH at 100kHz. 
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #15 on: June 06, 2018, 10:35:41 pm »
Ah, then you need to introduce loss -- a decreasing inductance is a resistance.

To go from 300uH at 10kHz, to slightly more than 30uH at 100kHz, is a parallel resistance around 190 ohms.

The Coilcraft model doesn't have a parallel (R+L) to adjust.  It does have a parallel (diffusion, skin effect / eddy current loss) impedance, k2.  This is softer than a resistor, so you can't meet both constraints at once.

Try these values:

Code: [Select]
* Coilcraft Part: Smokey-300
* Frequency Range: 0.001 to 1 MHz
.SUBCKT Smokey-300 1 2
XL 1 2 COILCRAFT_MODEL PARAMS: FMAX=1 R1=1 R2=1 C=0.000001p K1=0.000001 K2=0.27 K3=300
.ENDS

k4 and k5 only work in the original Coilcraft model, not the conversion; they control how inductance changes with frequency, usually by a negligible increment or decrement.  k1 controls skin effect, i.e., how DCR rises with frequency.

Actually, nevermind, just crank up the capacitance to a ridiculous value like 1e18.  This approximates a short circuit, so that R1 is directly in parallel.  Try these values instead:

Code: [Select]
XL 1 2 COILCRAFT_MODEL PARAMS: FMAX=1 R1=93 R2=0.001 C=1e18 K1=0.000001 K2=1000 K3=300
You can bring k2 back down around 10, and raise R1, to get a softer transition somewhere inbetween.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #16 on: June 07, 2018, 01:09:57 am »
cool. 
Using the equation inductance = Im(V(n001)/I(R2))/(2*pi*frequency) I get a pretty good roll off.  Close enough for sure.  The Yaxis scale does read in uOhms/Hz.

One more fun fact... If I try to do a transient simulation it immediately throws an error that "The Laplacian is singular at DC"
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #17 on: June 07, 2018, 05:49:41 am »
cool. 
Using the equation inductance = Im(V(n001)/I(R2))/(2*pi*frequency) I get a pretty good roll off.  Close enough for sure.  The Yaxis scale does read in uOhms/Hz.

One more fun fact... If I try to do a transient simulation it immediately throws an error that "The Laplacian is singular at DC"

Like I said... their method is nonphysical, hence my motivation for the converter.

Curiously, they don't show the rise in inductance at low frequency, which accompanies skin effect.  Most datasheets don't show this either.  My model does, which can give unexpectedly large inductances at low frequencies; but this is immaterial as it's actually a resistor down there (Q << 1), i.e., DCR dominates.  The lesson is: tune the model for correct inductance in the inductive band (above DCR / (2*pi*L)), and ignore the inductance rise below there. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Spice, How to change inductance based on frequency???.....
« Reply #18 on: June 07, 2018, 09:16:05 am »
.
« Last Edit: August 19, 2022, 01:51:28 pm by emece67 »
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #19 on: June 07, 2018, 08:09:33 pm »
DC = 1.1Ohm
100kHz = ESR measured at 35.2

Sorry for being that guy and withholding info, but I'm actually not working with a pure inductor.  It's actually a voice coil motor.  I hadn't planned on getting this deep into it here.   
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #20 on: June 07, 2018, 09:06:52 pm »
I once curve-fitted a speaker just for the hell of it,



The high frequency asymptote is mostly inductive, but at a low Q; clearly it's due to eddy currents in the pole pieces.  The other peaks and dips, of course, are thanks to mechanical and acoustic coupling.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Spice, How to change inductance based on frequency???.....
« Reply #21 on: June 07, 2018, 09:09:18 pm »
Wow.  That's a good fit for a complex curve like that.  Did you just manually tweak things until it lined up?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice, How to change inductance based on frequency???.....
« Reply #22 on: June 07, 2018, 09:18:19 pm »
Yeah. It's not hard to do, once you've done it a few times and understand how impedances work.  Just tedious.

In Excel, it takes about as much setup time as adjustment time, mainly because Excel is a terrible platform for complex vector arithmetic.  On the upside, I now have a spreadsheet with a dozen RLC elements in parallel, and all I need to do is start with a baseline value and turn on one after another as needed, until the curve fits.

Also if you have a data series, you can set up RMS error and use Solver to best-fit it.  You have to start close to a solution, but it makes the final adjustments very quickly and accurately.

Tim
« Last Edit: June 07, 2018, 09:21:24 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Spice, How to change inductance based on frequency???.....
« Reply #23 on: June 07, 2018, 10:31:54 pm »
.
« Last Edit: August 19, 2022, 01:51:37 pm by emece67 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf