Spice, How to change inductance based on frequency???..... - Page 1
Forum section: electronics / projects

author: Smokey
author_rank: Super Contributor
timestamp: May 26, 2018, 12:43:25 am
content: 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?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 26, 2018, 01:11:01 pm
content: 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~.htmlhttps://www.seventransistorlabs.com/Calc/Coilcraft1.htmlThe 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

author: CopperCone
author_rank: Super Contributor
timestamp: May 26, 2018, 04:24:23 pm
content: 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

author: Smokey
author_rank: Super Contributor
timestamp: May 26, 2018, 06:56:56 pm
content: Quote from: CopperCone on May 26, 2018, 04:24:23 pmI 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.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: May 26, 2018, 09:28:23 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 26, 2018, 11:23:22 pm
content: 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

author: Smokey
author_rank: Super Contributor
timestamp: May 30, 2018, 11:41:24 pm
content: Here is an archive.org copy of a blog about this...https://web.archive.org/web/20151006031049/http://iiitdelectronics.blogspot.com/2013/04/how-to-simulate-frequency-dependent.html

author: Smokey
author_rank: Super Contributor
timestamp: June 06, 2018, 12:18:07 am
content: 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!

author: Smokey
author_rank: Super Contributor
timestamp: June 06, 2018, 12:21:55 am
content: 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..

author: emece67
author_rank: Frequent Contributor
timestamp: June 06, 2018, 08:53:50 am
content: .

author: Smokey
author_rank: Super Contributor
timestamp: June 06, 2018, 06:06:52 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 06, 2018, 07:26:42 pm
content: 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

author: emece67
author_rank: Frequent Contributor
timestamp: June 06, 2018, 08:50:18 pm
content: .

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 06, 2018, 08:52:46 pm
content: 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,

author: Smokey
author_rank: Super Contributor
timestamp: June 06, 2018, 09:39:48 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 06, 2018, 10:35:41 pm
content: 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:* Coilcraft Part: Smokey-300* Frequency Range: 0.001 to 1 MHz.SUBCKT Smokey-300 1 2XL 1 2 COILCRAFT_MODEL PARAMS: FMAX=1 R1=1 R2=1 C=0.000001p K1=0.000001 K2=0.27 K3=300.ENDSk4 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:XL 1 2 COILCRAFT_MODEL PARAMS: FMAX=1 R1=93 R2=0.001 C=1e18 K1=0.000001 K2=1000 K3=300You can bring k2 back down around 10, and raise R1, to get a softer transition somewhere inbetween.Tim

author: Smokey
author_rank: Super Contributor
timestamp: June 07, 2018, 01:09:57 am
content: 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"

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 07, 2018, 05:49:41 am
content: Quote from: Smokey on June 07, 2018, 01:09:57 amLike 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

author: emece67
author_rank: Frequent Contributor
timestamp: June 07, 2018, 09:16:05 am
content: .

author: Smokey
author_rank: Super Contributor
timestamp: June 07, 2018, 08:09:33 pm
content: DC = 1.1Ohm100kHz = ESR measured at 35.2Sorry 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 07, 2018, 09:06:52 pm
content: 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

author: Smokey
author_rank: Super Contributor
timestamp: June 07, 2018, 09:09:18 pm
content: Wow. That's a good fit for a complex curve like that. Did you just manually tweak things until it lined up?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 07, 2018, 09:18:19 pm
content: 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

author: emece67
author_rank: Frequent Contributor
timestamp: June 07, 2018, 10:31:54 pm
content: .