A filter is critically dependent on the impedances at its input and output.
Mains is an unknown, so be careful there. You have complete control over the load side, but with the restrictions that it must have a low impedance, so that the negative input resistance of the SMPS doesn't create an oscillator, that its switching ripple is low enough for functional purposes (consequence: must have a shunt capacitor at this port), and that step load changes don't result in excessive step voltage changes.
Or general inputs, if not necessarily mains.
General inputs can be anywhere on the Smith chart: low or high impedance, resistive or reactive. There will always be some inductance due to connecting wires, but this may be fractional ~µH, and this may or may not play well with the input side shunt/branch of the filter. It could be high impedance from a long (inductive or resistive) cable, or a battery at low charge. (Obviously, at some point the SMPS will refuse to work on a high enough source impedance, but we might consider anything up to some limiting DC/LF value.)
To be clear, a port is, for these purposes, the connection at each end of the filter. For network theory purposes, we should confine ourselves to single-ended filters only (assume an ideal ground), in which case a port is two terminals, one being common ground, the other being the input/output node of the filter.
More generally, a port is a 2-terminal element for which there is some voltage drop, and no common-mode current (the terminal currents are equal and opposite, i.e. current flowing into one terminal flows immediately out the other); in other words, an ideal transformer (which can be approximated using real transformers and/or transmission lines*, if we need to). But for present purposes, we can consider them common-ground, and it only matters that it's one node with respect to ground.
*Transformers are a special case of transmission line, really.
If we later must consider the common mode response, we can develop a CM equivalent model, and express that as a single-ended filter. So this is nice and general, and we can smoosh things together later as needed. (For example, the DM and CM response of a CMC can be designed separately.)
What does the impedance of a filter mean, anyway? A couple things:
- It is the impedance, terminated into which, the designed frequency response will appear. (So, Butterworth/Chebyshev/etc..)
- It is the ratio of peak voltage in the transient response, to a peak current step applied to the port (or vice versa). (Mind, if it's poorly damped, a pulse train could excite much higher peak voltage/current; but for a single lone step, that isn't happening. And we should provide adequate damping anyway.)
- Squared, it is the ratio of inductance to capacitance, i.e. Zo = sqrt(L/C). (The product of course gives frequency, Fc = 1 / (2 pi sqrt(L C)).)
For a generic low-pass filter of ladder topology (alternating shunt C and branch (series) L), the overall L and C values are given by these two relations. Thus we can scale a prototype filter, say of Zo = ω_0 = 1, to any frequency and impedance desired, by scaling L and C respectively. The filter characteristic is given by the relative values of these elements to this (unity) baseline.
A filter must have at least one termination in the system. The most common prototypes use two (matched source and load). This works when you are embedding a filter in a resistive system impedance such as 50Ω matched source and load. It doesn't work so well here, as the above requirements show(!).
When we can assume the source impedance (say from a LISN), we might use that to dampen (terminate) the system. This already can be tricky, because the impedance might be very different from what we need (i.e. 50 ohms, when we need 0.1 or something!). When we can't, we can add impedance in series with the source, or in parallel to it, to equalize its impedance -- in effect providing our own LISN.
The key benefit to resistance is, it absorbs energy.
An unterminated (pure LC) filter will carry energy back and forth forever, at all frequencies -- there will always be some combination of source and load impedances where zero attenuation between source and load can be found. Maybe your source/load can't manifest such impedances so there will always be some minimum attenuation, but this is the hazard when using high quality components (and not providing damping resistance).
And yes, this is one of those "waves exist for all time" kind of aspects. We're considering frequency response here, for which it isn't important how long it takes the signal to propagate through the filter -- if we consider a step response for example, it might look alright --maybe it's got a lot of ringing, but it's not the full steppy step, so you might assume the highest frequencies have been attenuated -- but given enough time, we can still couple any frequency through a lossless network.
All this is basically to say, put some ESR on the capacitor(s), and you're fine. But which ones, and how much, is the key, and for which one should know some network behavior (if not a full understanding of network theory).
So, for typical examples, and given the constraints above, we could have:
Just C:If we assume resistive source, it's single order. If inductive source, 2nd order. If capacitive source, they add together, still single order (with respect to whatever resistance the source has; I mean here whether it's dominant reactive, but it's still going to have some resistance too).
We can dampen this by putting an R+Cb in parallel, Cb > 2.5 C, R = Zo = sqrt(L/C). Here, we need to know the maximum source inductance L, and the impedance at the load side will be no higher than Zo (or, give or take a small factor) for any 0 < L < Lmax and any frequency near or above cutoff.
LC:Starting with a series branch allows us to increase the source impedance, forcing the above situation with some L. We might still want a shunt R+C at the inlet, to account for the case of excessive source L (and to further increase attenuation, making a 4th order filter in that case), or we might want to use a lossy L (that is, in parallel with some R, or in series with L || R) so it remains damped when a very low impedance (short cables to a battery or large capacitor?) is connected.
Ferrite beads are often used this way, though they aren't very good in power applications as they saturate at quite low currents. They're best for signal purposes, where the peak currents are perhaps 10s mA, and involve component pins and transmission lines (PCB traces, wires in cables, wires or cables through free space) so the impedances are very modest (ballpark 100 ohms).
Note that, any time we put resistance together with reactance, we're making a pole-zero network, i.e. the impedance goes up or down to some limiting, constant (resistive) value. If we changed all the capacitors in an LC(LC..) network to R+C, we'd get a high-frequency equivalent circuit (i.e. short out the capacitors) of a chain of L-R dividers -- we've added zeroes to the transfer function, which reduces attenuation at HF. We probably want a few C's without R, or smaller C in parallel with some bulky R+C, to get the damping near Fc (and correspondingly we get a softer transition band -- this type of filter cannot give very sharp response) without having to rely on input or output resistance.
CLC:Very popular as Cs are cheaper than Ls, and sources often have some inductance (as alluded to above), so you might even get an implicit 4th order response. The inlet C might be low-ESR for good attenuation, while terminating it with a C || (R+C) on the load side -- choosing an impedance low enough to satisfy the impedance constraints, and Fc low enough to get the desired ripple rejection.
Higher order filters probably aren't a big deal (for DC, say at a buck input, you rarely need more than this; at mains, maybe two stages, or one onboard plus an inlet filter module), but there are some things you can do with them:
CLCLCSuppose we put LCs either side of a midpoint, bisect the filter, and put termination resistance here instead. To keep low DC/LF losses we still need to use R+C or R||Ls, but we can make the L or C of them almost arbitrarily large. The filter prototype(s), I think... doubly terminated would be best? So the average case is the best case (outside ports terminated), but the worst case is never more than twice as bad (one side still terminated)? Some research may be needed on that (i.e. optimal prototype choice for one side terminated, other side random impedance). Anyway, with the termination in the middle -- we can fully isolate the two halves of the filter, making input and output response independent of each other.
I kinda did a bit of that with this LISN, which I wanted to have well-damped response independent of the DC side impedance:
https://www.seventransistorlabs.com/Images/LISN_20MHz_30A.pnghttps://www.seventransistorlabs.com/Images/LISN_Built.jpgnote that the lossy inductor and both R+C'd C's contribute damping, so even if the DC port is short-circuit, L2 and C2 are damped, and if open, C3 is as well. The extra order meanwhile gives good attenuation between DC and RF ports.
In a power supply, you might use a similar scheme, but at a lower impedance, using electrolytics for the ESR.
Constant impedance filtersProbably the most technical generalization, we can construct filters of most prototypes*, such that a constant input resistance is had. This can be done at one or both ports, in which case the response indeed does not depend upon the source or load impedance -- there's no reactance from the filter (nor transfer through it, from source to load or vice versa, for the doubly-so case) to have any impact on the frequency response at either port, so it's perfectly ideal in that sense.
*Well, you can make a diplexing filter in any type, so there's that, but that requires double the element count. But of types that only require an RC, RL and/or RLC -- just the gentler types (Butterworth, Bessel), I believe?
This may be of interest:
http://jeroen.web.cern.ch/jeroen/reports/crfilter.pdfI don't recall if filter tables are available for these in more types, or if you're kind of stuck optimizing one on your own. Anyway, for power-line purposes, quite loose accuracy is required so it's no biggie to tweak a couple component values say in SPICE and be done with it. Which also satisfies the other not-so-hidden constraint: use few elements to keep cost and layout area down.
Speaking of area, you can optimize that as well by considering the energy storage of the whole filter. For a given attenuation at Fstop, you can find the minimum filter order such that energy storage is minimized. It can indeed be valuable to increase filter order to get a steeper slope, than to use a low order and very low Fc. Hmm, I derived that once, but don't recall the exact relation. I should derive that again, it's simple enough... Well, just to mention that that's a thing, anyway.
Tim