How to model mutial inductance in SPICE

Could some SPICE guru please help. I am trying to mofrl two parallel wires, each of diameter 'd' mm, of length 'l' mm , separated by 's' mm. These two inductors will have both self(each) and mutual inductance. They can be modelled in SPICE as two parallel inductors as follows: L0 START0 END0 L1 START1 END1 k0 L9 L1 0.99 where 'k0' is the coupling constant< So, now is the mutual inductance to be added to the circuit, Any hnts suggestions would be very helpful; Thanks in advance.

Reply to
dakupoto
Loading thread data ...

On Thursday, November 30, 2017 at 4:00:52 PM UTC+11, snipped-for-privacy@gmail.com wrot e:

The two inductances - L1 and L2 and the coupling constant in the third line define the mutual inductance.

The transformer equation is

V1 = L1.dI1/dt + M. dI2/dt V2 = M. dI1/dt + L2. dI2/dt

formatting link

For perfect coupling M^2 = L1.L2

and the coupling coefficient k is the extent to which M is less than the ge ometric mean of L1 and L2. The coupling coefficient has to less than one (t hough it can be very close to one) which is to say

M^2= k^2. L1.L2

note that k can be either positive or negative, so it's magnitude is what's less than one.

I hope this helps. I got introduced to the transformer equation after I'd b een using transformers for some years, and I found that it clarified my thi nking wonderfully. Introductory texts mostly avoid it - presumably on the S teven Hawking principle that every successive equation in a text halves the potential readership.

--
Bill Sloman, Sydney
Reply to
bill.sloman

K9 L0 L1 0.99 maybe?

You can either adjust K downward to tune the mutual L, or set K to

1.00 and add another discrete inductor to the circuit to represent the mutual/leakage inductance.

At high frequencies, the wires become transmission lines and can't be accurately modeled as inductors any more.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

Actually you can measure k more or less accurately if you've got a real circuit to model, and plug it into the simulation, Using it as a twiddle factor isn't a good idea.

The additional inductor might - sort of - model the leakage inductance, but it really doesn't represent what's actually going on.

Since you can model a transmission line as a series of capacitors (to ground) with a series of inductors between the capacitors, this is the kind of half-baked correct but unhelpful observation for which John Larkin is notorious.

--
Bill Sloman, Sydney
Reply to
bill.sloman

Well, to a certain degree of accuracy. But that quickly goes out of hand, so if you have harmonics in the frequency range where transmission line behavior is necessary to model, it's probably better to use the SPICE transmission line primitive.

Transmission lines are more fundamental than R, L and C anyway, and I eagerly suggest the novice research them and develop at least a basic understanding!

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

kin

,

Transmission lines start needing to be modelled as transmission lines when the frequencies you are putting through them get to the point that the line is longer than the wavelength.

Since Daku is talking about line lengths measured in millimetres and the sp eed of light is 300mm per nsec, this probably isn't going to be a problem f or him.

If he really does have to worry about what two parallel wires are going to look like, Spice isn't the modelling program to use.

There are field-modelling programs that set up and map the electromagnetic fields around the wires. I see ads for them from time to time, but in the p lace where I've worked we mostly had a guy with a Ph.D. in electrodynamics who'd written his own. You can buy the programs (or buy access to them) but they do seem to be expensive.

--
Bill Sloman, Sydney
Reply to
bill.sloman

Right. Lumped approximations of continuous transmission lines don't work very well in simulation or in real life. The number of sections increases as the square of Td/Tr, and even then it's not right; dispersion wrecks everything.

--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin

FEMM is free, but don't ask me how to drive it.

--
This email has not been checked by half-arsed antivirus software
Reply to
Jasen Betts

< So, now is the ?

I guess its "So, how is the ..." other wise it don't make sense.

It look like to me, that the other posters haven't understood the problem.

Looks to me like you want to know how to implement it in spice, with a normal GUI simulator.

Put all the lines in a .subckt.

.subckt line_model START0 END0 START1 END1 L0 START0 END0 L1 START1 END1 k0 L0 L1 0.99 .ends

And attach a symbol to the model to place on the schematic.

I corrected your k0 line. The L9 entry made no sense. It is specifying the "k" between L0 and L1 which actually implements the mutual inductance between them.

-- Kevin Aylward

formatting link
- SuperSpice
formatting link

Reply to
Kevin Aylward

Why bother?

L9 was obviously a typo for L0.

--
Bill Sloman, Sydney
Reply to
bill.sloman

Because not all Spices allow you to connect together schematic (GUI) placed inductors with mutual inductances via the schematic.

Actually, I only recently added the ability in SuperSpice to place F, H and B sources on the schematic, and have sources and nodes on the schematic control them. prior, they had to be in a .subckt

The example:

FHBSources.sss

Shows how this is done.

I guess I should add that feature to inductances as well. Oh well...

-- Kevin Aylward

formatting link
- SuperSpice
formatting link

Reply to
Kevin Aylward

It works fine in LTSpice. If it doesn't in SuperSpice, you probably did need to spell it out , but LTSpice is a lot more widely used.

Perhaps. In a fit of nostalgia I recently tried to up-date my version of SuperSpice, and Norton Antivirus wouldn't let me - apparently your website was dangerous to know.

My nostalgia wasn't intense enough to prompt me to contact you about it.

--
Bill Sloman, Sydney
Reply to
bill.sloman

Buh. Altium does that just fine (of all things..?). Of course, whatever source or expression you've entered, need not actually exist, or be in sync with what you thought you had...

Coupled inductors look funny, because while you can use a built-in transformer model as usual (two L, one K), you can instead take a two terminal component and assign a 'K' model to it, and it'll instantiate it as "Kname net1 net2 value". You need only name the nets with the inductor names you wish to K together...

Multisim, come to think of it, might be a case of the subckt method... although I think when you instantiate a built-in part, it gives you the VSRC to sense current, and FSRC to deliver it, and this is done transparently, not in a subckt as such. But anyway, the library models are packaged together like that, which does help with showing how things are connected.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

All but the last arguments to a K model are supposed to be inductors, not nets or anything.

What gives?

Jeroen Belleman

Reply to
Jeroen Belleman

toiLTspice amateurs who don't understand enough school-book electronics to look up "coupling" in the toiLTspice tutorials:

"One simply draws each winding of the transformer as an inductor and couples the inductors with a SPICE directive called a K-statement (e.g., "K1 L1 L2 1".)

To add the directive, choose SPICE Directive from the Edit menu. This allows you to place text on the schematic that is included in the SPICE netlist.

Once the inductor is mentioned in a K-statement, LTspice uses an inductor symbol with a visible phasing dot to indicate each winding's phasing."

In PSpice, "coupling" is simply a _component_ placed on the schematic, and can specify MULTIPLE inductor coupling coefficients. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

The spice parser don't treat what would otherwise be a node name, as a node.

A line like:

k1 texta textb 0.9

Is passed based on the "k" leading letter.

-- Kevin Aylward

formatting link
- SuperSpice
formatting link

Reply to
Kevin Aylward

I must be reading things in Tim's statement that aren't actually what he meant to say. I understood it as a way to trick spice into coupling *any* set of two-terminal components together, and that the leading arguments to the K directive could be net names.

That would be tricky indeed, but it's clearly not so.

Squinting at it askance, I suppose he meant to say that the K directive couples sets of two-terminal *inductors* together, so there is no need to use multi-terminal 'transformer' subcircuits. That's just the ordinary way. I can't remember that this ever looked funny to me.

Jeroen Belleman

Reply to
Jeroen Belleman

Well, not /any component/, but any instance of inductor with the given names.

This is what it looks like:

formatting link

The funny isn't so much that there's a k-statement, but that it's not an arbitrary SPICE directive on the schematic (how LTSpice does it). The k-statement itself is, like every other statement, a component; I'm just [ab]using the syntax to solve it on the schematic level.

Hmm, the same thing would work with an F/H source. I normally use the SUBCKT style for those, e.g.

formatting link

I thought there was a way to get arbitrary SPICE in Altium, but I may well be conflating that with something else. Or maybe it was Multisim, but there's actually a component for that, too, so they wouldn't need to allow that... dunno.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

Well, that at least illustrates how you came by this strange statement. I suppose this to mean that L1 and L2 have 98% of their flux in common. I guess that the netlist has no component named L3 and no circuit nodes with names L1 and L2.

Jeroen Belleman

Reply to
Jeroen Belleman

Right. Here's the relevant part of the netlist:

-=-=- C1 ACL ACN 0.1uF C2 NetC2_1 NetC2_2 0.1uF C3 NetC3_1 NetC3_2 100pF C4 ACN 0 2.2nF C5 NetC2_2 0 2.2nF C6 NetC3_2 0 2.2nF C7 NetC2_2 NetC3_2 2.2nF K1 L1 L2 0.98 L1 ACN NetC2_2 10m L2 ACL NetC2_1 10m R1 0 ACL 50 R2 NetC2_1 NetC2_2 1k R3 0 ACN 50 XR4 ACL NetC2_1 T60405-R6161-X504_CM V1 NetC2_2 NetC3_1 DC 0 SIN(0 1 1k 0 0) AC 1 0

.SAVE 0 ACL ACN L1 L2 NetC2_1 NetC2_2 NetC3_1 NetC3_2 V1#branch @V1[z] @C1[i] .SAVE @C2[i] @C3[i] @C4[i] @C5[i] @C6[i] @C7[i] @L1[i] @L2[i] @R1[i] @R2[i] @R3[i] .SAVE @C1[p] @C2[p] @C3[p] @C4[p] @C5[p] @C6[p] @C7[p] @L1[p] @L2[p] @R1[p] @R2[p] .SAVE @R3[p] @V1[p]

-=-=- It actually tries to save L1 and L2, but of course nothing else connects to the purported nets, so there's nothing to save (I suppose SPICE removes single pin nets).

If I pulled this trick in Multisim (assuming it would work, which it might not), it would instantiate a component K_K3 (and the nets would have to be named L_L1 and such), or something like that, whatever it is exactly.

Altium instantiates designators at face value if possible, otherwise prepending the required letter (if I change "K1" to "M1", say, it instantiates "KM1").

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.