Multiple coupled inductors in SPICE


When creating a SPICE netlist including multiple coupled inductors, it is tempting to save on a bit of typing, and leave out some of the apparently redundant coefficients. For example, if L1, L2 and L3 are all coupled, and you are approximating ideal behaviour by using coupling coefficients of 0.999, you may well think that with a coupling coefficient of 0.999 between L1 and L2, and the same between L2 and L3, it implies a coefficient of 0.998 between L1 and L3, so it's not worth the hassle of typing in the third coefficient.

WRONG!!! If you do this, fucking weird shit happens. Huge DC offsets appear for no apparent reason and build exponentially to gigavolt or teravolt levels, eventually resulting in a failure to converge. You can spend ages wondering what the fuck is going on, thrashing at the problem trying to get it to converge, looking stuff up on Google on what to do with an intractably non-converging circuit (not that any of that stuff is ever any use anyway, but that's a separate matter), and not getting anywhere because there are no pages on the net apart from this one that tell you you can't get away with missing out the apparently redundant coefficients. Why this is, I have no idea, but I thought I should rectify the omission.

So, there it is. When simulating multiple coupled inductors (or coupled multiple inductors, to help the search engines :-) ) in SPICE, you must include coupling coefficients for each possible pair of inductors in a coupled group. So for three inductors you must have three coefficients, for four inductors six coefficients, for five inductors ten coefficients... for n inductors, (sigma x for x=1 to n–1) coefficients. It's a pain in the arse, but if you miss any out it fucks it up completely.

Of course some versions of SPICE do let you specify a single coupling coefficient to apply to more than two inductors, so you can just write eg. "K1 L1 L2 L3 0.999" etc. If you're using one of those versions, you're laughing. But they don't all let you do that, and this page is something you need to know if you're using one of the ones that doesn't.




Back to Pigeon's Nest


Be kind to pigeons




Valid HTML 4.01!