Author Topic: LTspice modeling of SMPS Filters  (Read 8960 times)

0 Members and 1 Guest are viewing this topic.

Offline sean0118Topic starter

  • Frequent Contributor
  • **
  • Posts: 456
  • Country: au
LTspice modeling of SMPS Filters
« on: October 10, 2017, 09:51:37 am »
Hi everyone,

I've been getting into simulating some switched-mode power supply filters in LTspice. There's a lot of material available online, but I still have some questions...


I've been modeling common-mode chokes as coupled windings, but I'm unsure whether I should use ideal coupling (K1 L1 L2 1) or say 90% (K1 L1 L2 0.9)? Am I right assuming a lower coupling between windings increases the attenuation of differential signals? In the 'real world' what is the difference in inductance of a common-mode choke for both common-mode and differential signals?

Also, with common-mode chokes, it seems common to put them on the AC input side of SMPS, but can they also be added to the output DC side?


With regards to AC analysis, for an AC input filter is it best to have both the source and load (SMPS input) as 50ohm? Or should the SMPS input be modeled as a constant current load or similar?

Also, why do the 1nF capacitors to GND in my attached simulation cause resonances if I plot Vout+? They disappear if I plot the differential of Vout+ and Vout-...   I understand they are there to bypass common mode signals, but I'm unsure how to simulate that...   :-//



Thanks everyone.  :-+


edit: Image for anyone without LTspice:

« Last Edit: October 10, 2017, 09:58:57 am by sean0118 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LTspice modeling of SMPS Filters
« Reply #1 on: October 10, 2017, 05:56:51 pm »
This is a tricky subject:

- You need to measure CM and diff, and match them up to observations.

- CM chokes are not simple inductors, but complex elements all their own.  Here's a curve fit I did of a VAC common mode choke:





The R+L parts correspond to the flattened rising slope, characteristic of eddy currents in the laminated metallic core material.  The dominant, naive model would be just R1, L1, C1, but as you can see, many more components are necessary to accurately capture the complex behavior of such an element.  Even so, it breaks down above 10MHz, where I didn't bother doing it too accurately (and maybe their measurements are a bit questionable as well).

I think they measured that curve for a single winding, the other open circuit; so the other winding will act as a 1/2 wave resonant stub, and that's probably what causes the notch (at 10MHz, represented by C2, L2 I think).  Noteworthy that R5 is not physically realistic (it has to be DCR only), it could stand to be another R||L element.

And ALL of this circuit, is simply the model of one winding.  It's not the transfer characteristic between windings -- I don't have data for that anyway.  Replace V1 with your entire circuit around L1, say, and you'd have the right impedance (if you're using this VAC part), but just for the one line.

- Similarly, the capacitors need to be modeled.  This is usually pretty straightforward, as film capacitors are pretty well behaved, and only their low impedance properties are important here (the finest details of loss, of Q factor, won't affect the filter much).  An RLC series equivalent is usually the way to go.

- The very circuit itself -- the layout -- should ideally be modeled as well.  Traces have low-frequency-equivalent series inductance and parallel capacitance, and nearby traces couple to each other (the inductors have small k).


All of this is not to make you feel hopeless about things.  There are only finitely many things to worry about, and all those things absolutely can be measured, modeled and solved for.  Such is the domain of engineering: a lot of busy work, driven by some smart theory, and often ultimately implemented by turning a bunch of knobs until it looks right. :P

In actual answer to one of your questions: CM chokes are usually in the k = 0.98 range.  Depends on type.  In my above example, if it is reasonable to assume L2, L3 and L4 are the leakage between windings, then the total of about 2.5uH, in relation to the primary inductance (lowest frequency equivalent) of 37mH, gives k ~= 0.992.  This is fairly exceptional, because nanocrystalline cores have very high permeability, but still not far off (about 0.99, versus 0.98 for most ferrite cores, or maybe down to 0.90 for powder (MPP) cores, if you happen to find such a thing used for CMC).

CMCs can be placed on the DC side, yes: the difference is they don't filter FWB diode recovery noise.

The source impedance can be 50 ohms (this is how most filter manufacturers rate their products -- there's also a 1/100 ohm asymmetrical test, or something like that).  The load depends on what circuit you're looking at.  If you're considering the filter performance during the AC input peak, where the FWB is conducting (low impedance), then the load is a big honking electrolytic, and the common mode impedance is whatever capacitance to ground, and to secondary side, is present (often capacitance from transistor tab to heatsink, from primary to secondary inside the transformer (these two are the most common offending sources, by the way -- you can model this as well!), and any Y capacitors added in these locations).

Note that, anywhere you have L and C together, you also have an impedance, whether you meant to or not.  This is Z = sqrt(L/C), the resonant impedance.  Typically you'll have a large Z for common mode and a small Z for diff mode.

Remember that a filter always has a load impedance.  If you do not provide one, it will find one of its own, and it probably won't be what you were expecting. :) (Perhaps the response peaks at an unlucky frequency, corresponding to the filter's load being some parasitic resistance in the components.)  The source being 50 ohms helps with this, and you can use that as the basis for damping the filter; you may want other resistances though, such as an R+C across the line to provide diff mode dampening (the diff mode is a rather low impedance, because leakage inductance is small -- a few uH -- and C is large, around 1uF), or a ferrite bead in series with a Y capacitor for CM damping.

Distributing losses throughout the filter helps by making the filter response less sensitive to source and load impedances.  Like the VAC core example: that flattened rising slope is very lossy (lots of R+L), so a filter can be well damped if it has a resonant peak in that frequency range.

Oh, regarding measurements: you're applying a half CM, half diff signal, and measuring some mixture of the two at the load end.  The definition of CM is (Vout+) + (Vout-) / 2, and diff is (Vout+) - (Vout-).  Apply source voltages accordingly!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: peetDup

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: LTspice modeling of SMPS Filters
« Reply #2 on: October 10, 2017, 10:37:56 pm »
From my own experience playing with such things, my advice is so not forget to add realistic capacitor and inductor ESR (even if extremely low).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LTspice modeling of SMPS Filters
« Reply #3 on: October 10, 2017, 10:52:06 pm »
From my own experience playing with such things, my advice is so not forget to add realistic capacitor and inductor ESR (even if extremely low).

Yeah, even if each part is represented by a single order RLC (so, for the capacitor, RLC series; inductor, RLC parallel, usually also with DCR too), that's a long way towards getting realistic numbers.  As you go up in order (each parasitic R/L/C you add to the model), it gets more accurate.

The reason I gave the example I did, is because it shows how complex inductors can be.  The difficulty is that there are contributions from the winding itself (some variation on a helical waveguide, if you like to read far too much about things as I do :) ), as well as the winding over the core (a metal core is pretty conductive, so acts as one plate of a capacitor, against all the turns in the winding -- a distributed capacitance or transmission line effect; whereas ferrite has a high dielectric constant, and is lossy, so has a loading effect with dissipation), and the magnetic field penetrating into the core (in much the same way that skin depth arises as AC current penetrates into a conductor).  All these factors lie within the passband of interest (0.1-30MHz), so models that are usefully accurate can get complicated very fast. :(

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

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: LTspice modeling of SMPS Filters
« Reply #4 on: October 10, 2017, 11:18:49 pm »
Hi,

Impedance

The OP shows modelling the SMPS filter in a 50 Ohm environment, 50 \$\Omega\$ input and 50 \$\Omega\$ load.

This simplification will get you into trouble every time. If the SMPS output impedance was 50 \$\Omega\$ it would be trivial to get the rid of the noise. The input and output impedance of a power supply is low, very low.

This is a mistake that some (many) filter manufacturers make.

Modeling Common Mode Chokes

The relationship between the coupling coefficient and leakage inductance is:

L (leakage) = Inductance ( 1 - K2)

So a 1mH inductor with K=0.99

The leakage inductance is 1mH (1- 0.992) = 19.9 uH

So simplified:
  K= 0.995 is 1% leakage inductance
 K= 0.99 is 2% Leakage Inductance
...

This is true if K if K>0.9

Having said that, I would model the leakage as an inductor, not as a coupling coefficient, to keep the ground continuous.

You have to include all the parasitic elements in the circuit, ESL, ESR, self resonant frequency etc.. to be successful.

Regards,

Jay_Diddy_B

« Last Edit: October 10, 2017, 11:21:22 pm by Jay_Diddy_B »
 

Offline sean0118Topic starter

  • Frequent Contributor
  • **
  • Posts: 456
  • Country: au
Re: LTspice modeling of SMPS Filters
« Reply #5 on: October 11, 2017, 10:55:36 am »
Thanks for the responses everyone, it's going to take me awhile to get my head around all of the concepts.  ;)


- You need to measure CM and diff, and match them up to observations.

Thanks Tim, that's a very interesting model, I wish my network theory was that good. Just to check, you used a network analyser or similar to measure the response of one winding, then made the model to fit the curve?

- Similarly, the capacitors need to be modeled.  This is usually pretty straightforward, as film capacitors are pretty well behaved, and only their low impedance properties are important here (the finest details of loss, of Q factor, won't affect the filter much).  An RLC series equivalent is usually the way to go.

The capacitors are modeled with series R of 0.2ohm (it's just not visible on the schematic) and the CM inductors with series R of 0.4ohms. I'll look into adding series inductance to the capacitors, good idea.

All of this is not to make you feel hopeless about things.  There are only finitely many things to worry about, and all those things absolutely can be measured, modeled and solved for.  Such is the domain of engineering: a lot of busy work, driven by some smart theory, and often ultimately implemented by turning a bunch of knobs until it looks right. :P

But they can all be modeled to an infinite accuracy, so I'm screwed!  :-DD

In actual answer to one of your questions: CM chokes are usually in the k = 0.98 range.  Depends on type.  In my above example, if it is reasonable to assume L2, L3 and L4 are the leakage between windings, then the total of about 2.5uH, in relation to the primary inductance (lowest frequency equivalent) of 37mH, gives k ~= 0.992.  This is fairly exceptional, because nanocrystalline cores have very high permeability, but still not far off (about 0.99, versus 0.98 for most ferrite cores, or maybe down to 0.90 for powder (MPP) cores, if you happen to find such a thing used for CMC).

Does the leakage inductance act as a differential mode filter? Even 1% leakage is quite large inductance seeing that alot of CM chokes are in the tens of mH range.

Typically you'll have a large Z for common mode and a small Z for diff mode.

Why is this? Would a large Z for diff mode lead to instability?


... you may want other resistances though, such as an R+C across the line to provide diff mode dampening (the diff mode is a rather low impedance, because leakage inductance is small -- a few uH -- and C is large, around 1uF), or a ferrite bead in series with a Y capacitor for CM damping.

I had 10ohms in series with 2.2uF across the line at the SMPS input, but I took it out when I posted it, I should have left it in.  ;)

Oh, regarding measurements: you're applying a half CM, half diff signal, and measuring some mixture of the two at the load end.  The definition of CM is (Vout+) + (Vout-) / 2, and diff is (Vout+) - (Vout-).  Apply source voltages accordingly!

Okay I see what you mean, would this be the right source for a CM measurement? What should the source be for differential measurements?




 

Offline sean0118Topic starter

  • Frequent Contributor
  • **
  • Posts: 456
  • Country: au
Re: LTspice modeling of SMPS Filters
« Reply #6 on: October 11, 2017, 11:34:10 am »
From my own experience playing with such things, my advice is so not forget to add realistic capacitor and inductor ESR (even if extremely low).

Thanks, I've added ESR, but it's not shown on the schematic, can only see it when selecting components in LTspice. There are a lot of other parasitics I should now add though, for example, I don't have parellel resistance or capacitance on the inductors.  ;)

Didn't even know that helical waveguides were a thing! Still getting my head around rectangular ones.  :D



The OP shows modelling the SMPS filter in a 50 Ohm environment, 50 \$\Omega\$ input and 50 \$\Omega\$ load.

This simplification will get you into trouble every time. If the SMPS output impedance was 50 \$\Omega\$ it would be trivial to get the rid of the noise. The input and output impedance of a power supply is low, very low.

This is a mistake that some (many) filter manufacturers make.

Thanks, I should have said, the filter I posted above would have AC mains on the left and SMPS input on the right. I see your point though and it's annoying that most (if not all) thwe filter datasheets I've looked at list attenuation for 50ohms source/load.

So I guess the simulation I've posted is measuring attenuation of noise injected from the mains side, but if I'm interested in siming the noise injected from the SMPS back to the mains, how would I do that? What would source/load impedances be then? Would the SMPS input look like a current source?

The relationship between the coupling coefficient and leakage inductance is:

L (leakage) = Inductance ( 1 - K2)

...

Having said that, I would model the leakage as an inductor, not as a coupling coefficient, to keep the ground continuous.

You have to include all the parasitic elements in the circuit, ESL, ESR, self resonant frequency etc.. to be successful.


Thanks for the correct leakage inductance formula, I did not know that.  ;)

Would the leakage inductance be in series with each windings or parallel to them? Looking at Tims model I think it's mostly series?

I might go read up on 'self resonant frequency', heard of it, no idea how to model it...   :scared:   ;D



 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LTspice modeling of SMPS Filters
« Reply #7 on: October 11, 2017, 04:09:06 pm »
Thanks Tim, that's a very interesting model, I wish my network theory was that good. Just to check, you used a network analyser or similar to measure the response of one winding, then made the model to fit the curve?

Datasheet curve, which would've used a NA of some sort, yes.

Unfortunately they didn't measure winding-to-winding properties, so I didn't create a complete model of the component: just one aspect of it.

Quote
The capacitors are modeled with series R of 0.2ohm (it's just not visible on the schematic) and the CM inductors with series R of 0.4ohms. I'll look into adding series inductance to the capacitors, good idea.

Ugh, hidden parasitics.  One reason I HATE LTSpice.

Quote
But they can all be modeled to an infinite accuracy, so I'm screwed!  :-DD

Mathematician: "But I'll never touch her!"
Engineer: "I'll get close enough..."
:-DD

Quote
Does the leakage inductance act as a differential mode filter? Even 1% leakage is quite large inductance seeing that alot of CM chokes are in the tens of mH range.

Yes, and yes.  Check out the LF equivalent model for a transformer:



Note that Xo/Ro includes a capacitor, representing winding capacitance.  There is also capacitance between primary and secondary.

This is shown primary-referred.  A symmetrical model keeps Z2 on the secondary side.

Actually, a couple of things should be rearranged, as far as the order of leakage inductance, capacitance and core inductance.  But anyway, the correct ordering, and the level of complexity of each element, depends on the component being modeled, and the frequency range desired.  So yeah.

BTW, leakage physically arises from the inductance between windings, without core.  If the windings are uncoupled without core (which is nearly the case for most toroids, where the windings are on opposite sides of the core, probably k ~ 0.07 without core), then the leakage inductance is simply the inductance of each winding (without core).

When you introduce the core, the magnetizing inductance goes up, so k goes up.  But the leakage remains nearly constant!

Quote
Typically you'll have a large Z for common mode and a small Z for diff mode.

Why is this? Would a large Z for diff mode lead to instability?

Just the fact of the components: for a diff mode cutoff of 100kHz, and diff mode inductances (leakage) on the order of 20uH, you get Zo = 12.6 ohms (and C = 0.13uF).

And again, CM impedance is mainly set by capacitance at the SMPS end, and Z of the chokes.

Quote
Okay I see what you mean, would this be the right source for a CM measurement? What should the source be for differential measurements?



Not quite: you've shorted out diff mode.  Where the original source was, put 25 and 25 ohms, so the generator drives the tap between them.  And, technically, the CM generator will be 37.5 ohms, since the 25's act in parallel for 12.5 ohm equivalent, and that equivalent acts in series.  Right? :)

Same thing at the load end, you can divide the 50 ohm diff resistor into two 25's and read Vcm off the tap, no need for postprocessing math. :)

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

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: LTspice modeling of SMPS Filters
« Reply #8 on: October 12, 2017, 03:07:48 pm »
Quote
The capacitors are modeled with series R of 0.2ohm (it's just not visible on the schematic) and the CM inductors with series R of 0.4ohms. I'll look into adding series inductance to the capacitors, good idea.

Ugh, hidden parasitics.  One reason I HATE LTSpice.

...

Tim
After adding the parasitic value in the normal way (right click component, fill in fields), you can Ctrl-right-click the component, then check the "Vis" box next to the paramters you want to be visible.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf