Approach to design a multi-stage RLC low-pass filter? - Page 1
Forum section: electronics / projects

author: kreyszig
author_rank: Regular Contributor
timestamp: March 06, 2023, 07:08:07 pm
content: Hi,So if I want to decide on a multi-stage RLC low-pass filter for the input of an SMPS (to filter its input, but also to prevent noise from the SMPS to back feed into the source), what is a good approach? I have a hard time to wrap my head around this. Some assumptions can be made about the voltage of the source at rest, the inductance of the wires to the SMPS, the frequency of the SMPS, the current drawn from it (hence its average resistance). Where do we go from there?For a single-stage low-pass filter I guess it is more straightforward, but for I have a harder time with a multi-stage one. For example, if the impedance of a second stage is large compared to the first stage, then the second stage can be approximated as being independent from the first stage, but is it necessarily something we want to do or just a short cut to make it easier to understand? Also the fact that there is some optimisation to do for the impact of the circuit both for the SMPS and the source confuses me.Also, if I had an expression for the source Thevenin's equivalent circuit and also for the complex impendance of the load, is there a method to optimize for an n-stage filter?Thanks!

author: jonpaul
author_rank: Super Contributor
timestamp: March 06, 2023, 09:33:52 pm
content: mains EMI filters are very well documented.Stock filters, CM, DM chokes, X, Y caps.What's the PSU Vin, Vout, P ?Jon

author: kreyszig
author_rank: Regular Contributor
timestamp: March 06, 2023, 09:53:21 pm
content: Quote from: jonpaul on March 06, 2023, 09:33:52 pmVin is 5-15V DC (~12V more likely), Vout is 5V, Pout is 3W, using MP4576 converter (using LPD8035V-333 fly-back for dual outputs) at 300 kHz, forced PWM. Power using about 1 m of cable. I want to prevent prevent oscillations, constrain EMI, limit current draw at startup. There was some off-topic discussion about it here:https://www.eevblog.com/forum/projects/surge-protection-grounding-and-fail-safe-biasing-for-isolated-rs-485/. What I would really like to learn is the full thought process when deciding on a number of stages. designing the filter and picking components. There seem to be so many possible configurations including using TVS, MOVs, ferrite beads, etc.Thanks!

author: Benta
author_rank: Super Contributor
timestamp: March 06, 2023, 10:25:27 pm
content: If input noise is a prime consideration, use a SEPIC converter instead. Much more flexible and in your case no more complicated. At 3 W it's a perfect choice.https://en.wikipedia.org/wiki/Single-ended_primary-inductor_converter

author: kreyszig
author_rank: Regular Contributor
timestamp: March 06, 2023, 10:41:07 pm
content: Quote from: Benta on March 06, 2023, 10:25:27 pmThanks. I need one dual output, one isolated and one non-isolated, this is why I went with a buck converter+ fly-back ("Fly-buck") design. I am fairly confident that this is a good design for my application. Designing filtering around it (input + outputs) is more what I am looking for. There are two proposed filter configurations in the MP4576 datasheet. As discussed in the other referenced threads it looks like there are issues with the one suggested for EMI filtering.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 06, 2023, 11:14:23 pm
content: 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

author: Benta
author_rank: Super Contributor
timestamp: March 06, 2023, 11:40:39 pm
content: Quote from: kreyszig on March 06, 2023, 10:41:07 pmIt's not a problem doing a multi-output (isolated) SEPIC design:https://www.edn.com/power-tips-83-isolating-a-sepic/

author: jonpaul
author_rank: Super Contributor
timestamp: March 07, 2023, 12:23:33 am
content: Rebonjour a kreyszig et TeskaCoil....kreyszig a few questions please:DC source ..battery? Lin PSU? SMPS? UPS? Solar?Transient perceived sources... eg lightning? Vehicle alt load dump? Inductive load off/on on same bus?Environment Vehicle? Land, sea air?one off /DIY/production?See the excellent BOOKS on EMI filter designHave fun,Jon

author: kreyszig
author_rank: Regular Contributor
timestamp: March 07, 2023, 02:19:16 am
content: Quote from: T3sl4co1l on March 06, 2023, 11:14:23 pmThank you for all the info! I will go through all the types of filters you mentioned!

author: kreyszig
author_rank: Regular Contributor
timestamp: March 07, 2023, 02:25:28 am
content: Quote from: Benta on March 06, 2023, 11:40:39 pmIt looks interesting. How important is it to have coupled L1 and L2 inductors? Low leakage, isolated 1:1:1 30 uH transformers seem to be even harder to find than two coil ones... Is it common for people to make their one transformers? Maybe it would be better to discuss the regulator topic in this thread instead:https://www.eevblog.com/forum/projects/efficient-regulated-5v-and-isolated-reg-5v-supply-from-unreg-2w-12-7-v/. Thanks!

author: kreyszig
author_rank: Regular Contributor
timestamp: March 07, 2023, 02:33:18 am
content: Bonjour Jon,Quote from: jonpaul on March 07, 2023, 12:23:33 amDC source is another board (connecting to a port with a 12V DC line using a ~1m cable. The 12V Dc is generated from mains)Quote from: jonpaul on March 07, 2023, 12:23:33 amThe board powering my circuit is part of a house heat pump air handler. The circuit I am working on is to control the heat pump using RS-485. It is a one off for now, but I am part of a community working with these heat pumps, so their might be interest from other people.Quote from: jonpaul on March 07, 2023, 12:23:33 amThank you for the book suggestions. They seem a bit difficult to find, but I will keep lookgin!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 07, 2023, 03:29:16 am
content: See also Henry Ott's book(s).Triple windings aren't so important as you can just parallel the primaries of two 1:1s. The downside is maximum leakage between s1-s2 (i.e. Ls1-s2 = Lp-s1 + Lp-s2; in a single transformer, there can be better coupling between them), which affects cross-regulation. But that might not be a big deal.Transformers are easy enough to make; at a minimum you need magnet wire, cores and tape, with bobbins a plus (maybe not strictly necessary for shape cores, but a big plus). Fortunately they're carried by the major distributors these days.And tape is somewhat optional if you have good enough insulation on the wire; there aren't many good sources of TIW (triple insulated wire) but it's great stuff when you can get it.Transformers are hard to makewell; for EMI purposes, understanding the transmission line nature of one can help quite a bit.Also consider a 5V supply then a 1:1 DC-DC, which can be a module, or make your own with a pair of transistors or SN6501/MAX253 or etc. Often a quite crappy sort of supply (no regulation, maybe not even current limiting/protection), but when you only need a watt and the load is consistent and known, that can be tolerable.One advantage is, these can be on the quiet side thanks to the relatively low gain at high frequencies (for oscillators) and balanced operation. (That is, for 1CT:1CT windings, equal and opposite voltages are applied across the inter-winding capacitance, giving little residual. Mainly what's left is due to timing mismatches between the winding halves and the leakage inductance between them. Which can still be quite small; I measured this parthttps://www.digikey.com/en/products/detail/pulse-electronics/PH9185-011NLT/3503430withsuspiciously lowleakage between any 4 winding halves. Hm, I forget what it was anymore; 100nH? 10nH seems to come to mind... It's made with TIW by the way, hence the low leakage despite the high isolation.)And high frequencies are easier to deal with in terms of CM filtering, at least as long as it's not gotten into any wires or circuit bulk (read: antennas) yet.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 07, 2023, 02:48:47 pm
content: Quote from: T3sl4co1l on March 07, 2023, 03:29:16 amThanks for the book suggestion, "Electromagnetic Compatibility Engineering" seems good. About TIW, there seem to be some options on Aliexpress for reasonably sized rolls. Not my default place to look, but when there is no availability at Digikey, etc and for more straightforward stuff? Do you think going with a SEPIC vs a buck SMPS would be worth it? I was hoping to finish designing my circuit soon. I am learning a ton, but doing a lot of redesign.Thanks!

author: Benta
author_rank: Super Contributor
timestamp: March 07, 2023, 05:07:32 pm
content: The nice thing about the SEPIC is that its input is a capacitor and an inductor. For this reason, it sends practically no switching noise back on the DC input bus. You might say it's filtered already.Same thing for the Cuk, by the way.

author: kreyszig
author_rank: Regular Contributor
timestamp: March 07, 2023, 06:11:06 pm
content: Quote from: Benta on March 07, 2023, 05:07:32 pmYes I agree these are nice features. I am just not sure if I want to start making a custom transformer in order to use this design (I was aiming for ~80% power conversion efficiency, 600 mA total isolated + non-isolated 5V outputs), as it looks like what is available off the shelf from WE, CoilCraft and Pulse is rather limited.

author: kreyszig
author_rank: Regular Contributor
timestamp: March 11, 2023, 04:16:00 pm
content: Quote from: T3sl4co1l on March 06, 2023, 11:14:23 pmHi Tim,I am trying to reproduce what you said above so I make sure I understand properly. I wrote the transfer function for an inductor in series with a capacitor C which is itself in parallel with a capacitor Cb in series with a resistor R. The transfer function I get isH(s) = 1/ (R L C Cb) (1 + s R Cb) / {s^3 + [ 1/(RC) + 1/(RCb) ] s^2 + s / (LC) + 1 / (R L C Cb) }Where do you go from here to get to Cb > 2.5 C, R = Zo = sqrt(L/C) , given that the transfer function has three poles?Thanks!!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 12, 2023, 04:32:42 am
content: If you don't need an analytical proof, it will suffice to put things in terms of omega = 1/sqrt(LC), Zo = sqrt(L/C), zeta = R/Zo, and alpha = Cb/C, then plot around normalized omega = 1 and Zo = 1 and see the effect of alpha and zeta on overall Q, Fc and shape (pole/zero locations). Otherwise, keep working it to get magnitude transfer function and peak amplitude, and see what minimum Cb is needed to eliminate the peak (actually, that might be a bad plan of attack, since the peak going away means there's no local maxima to find..). Or find the poles and zeroes of the transfer function (it's "only" cubic?) and solve for various interesting properties: pole-zero cancellation, Q of the complex pole pair (for target response, or critical or over damping), etc.I believe Cb = 2.5 C and R = Zo gives Q <= 2 or something like that. It's been a while since I went through the calculation (or plotting).Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 12, 2023, 01:23:31 pm
content: Quote from: T3sl4co1l on March 12, 2023, 04:32:42 amThanks. I will express the transfer function in terms of omega, Z0, zeta and alpha and see if I can manage to find analytical expressions for the poles. Last time I tried I obtained a very ugly expression. I did some plotting with Spice though, and what I found is that RL has to be slightly under half Z0 in order to get to critical damping, otherwise I end up with an underdamped response (see example with RL ~= 2/3 Zo)?Edit: Hmm, in fact if I try with different scales (e.g. L=253.3u, C=10n, R=159.15, RL~=2/3R), I get a totally different response from Spice, as if the critical damping condition for L, C, R and RL was different from the one you provided. Am I using the right circuit? Thanks!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 12, 2023, 10:30:54 pm
content: With RL alone you can solve for any level of damping without the RC. The RC is only needed to cover the worst case (maximum) RL values, or if load is CCS (since we don't care about its DC characteristic, only AC / incremental resistance).Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 13, 2023, 01:43:31 am
content: Quote from: T3sl4co1l on March 12, 2023, 10:30:54 pmYes, in fact I had added the RL after trying without it. Without RL the response I have is more underdamped (see attachment). Without RL there is no R value that seems to reach critical damping using Cb=2.5C.Edit: There was an issue with the original Spice simulation. I updated this post with the right results

author: kreyszig
author_rank: Regular Contributor
timestamp: March 13, 2023, 02:07:01 am
content: In order to reach critical damping with the same values for L and C, I need very different Cb and R values (R needs to be smaller, and Cb needs to be 3 orders of magnitudes larger)Note: I edited this post due for the same reason as my previous post.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 13, 2023, 02:39:04 am
content: At those values, we can ignore C and reduce it to a series RLC. That should be heavily overdamped, not critical: sqrt(253.3u/500u) ~= 0.71Ω and R is 11 times larger. There will be a pair of real poles near Fc (not quite the R*Cb and L/R time constants, because they pull together) with a zero at Cb*Rb, then one additional pole much higher at C*Rb.For closely clustered values, the poles all affect each other and simple approximations like the above aren't possible, you more or less have to factorize the transfer function to separate them.It might be the case that for Cb = 2.5C, maximum damping is Q ~ 1, or 1.5 or thereabouts; I'm not sure exactly. Like I said, it's been a while since I derived this (if I did at all?..). But still, that's close enough for supply purposes.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 13, 2023, 01:07:46 pm
content: Quote from: T3sl4co1l on March 13, 2023, 02:39:04 amHi Tim,so there was an issue with my previous two results that used L=253.3 uH. There was a comma in the value instead of a dot which caused Spice to use an arbitrary value it seems. I fixed it, but the conclusions from the simulations remain relatively the same (I updated my last two posts with the new results). Basically R needs to be quite a bit smaller than sqrt(L/C), and Cb needs to be much larger than C, in order to reach critical damping. If I lower R, filtering improves, but I cannot really lower Cb without the filter becoming underdamped. The value for Cb to achieve critical damping is so large that it can basically be ignored (I can replace it by a short and I get basically the same Q). With R set to sqrt(L/C), I get about 5 dB gain at 65 kHz.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2023, 03:00:57 am
content: Let me see here...oh, that was a careless bug...Well, that's why this tool isn't officially published...Anyways, here's a screenshot from this tool I made; it's set up so values can be click-dragged in real time, so it's handy for problems like this. The circuits still look a bit messy but the enabled elements are only the variables shown. So there's a series La (branch 1), shunt Ca (branch 2), and shunt Ra + Cb (branch 3). These are your L, C, Rb, Cb.Just starting with omega_0 = 1M, Zo = 1, Cb = 2.5C and varying R, minimum is pretty close to 1.09 ohm. For Cb = 1u, the minimum peak is at about 3 V/V, for R = 1.71 ohm. At Cb = 10u, it flattens out to 1.2 V/V at R = 0.8 or so.Even with Cb = 1000u, there is still some rise to overall voltage gain. What's going on is, for intermediate values say Cb = 50u, too-low R makes Cb dominate, while too-high R makes C dominate. There's always some capacitive reactance leftover, which resonates however slightly with L.The system can be well damped in the sense of no complex poles, but the zero still gives some voltage gain, which might be what you're seeing. At least, I think that's an adequate description of what's going on.Because of the zero, we can't get a perfectly monotonic response as we expect for an all-pole filter.To get voltage gain very close to 1 maximum, an astronomical Cb value is required, since it's just swamping out the zero. For example, Cb = 100u gives a peak of ~1.02 at R = 0.717; Cb = 200u gives a peak of ~1.01 at R = 0.711; even Cb = 1 (that'sfarads) gives a peak of 1 + 2.03e-6 at R=0.7. Sounds like a pattern to me!Another analysis is input impedance: since this network is series resonant with respect to the voltage source, we should optimize for maximum impedance at the valley. For this goal, Cb = 2.5u and R = 1.25 is pretty close to the max (Zin(min) = 0.43 ohm or so). For Cb = 10u, it's around R = 0.955 and Zin(min) = 0.604.Output impedance is roughly the inverse, of course.For power supply purposes, we really just want it well-enough behaved, so we don't mind the zero as long as it's modest, and as long as the peaks are low and broad.Tim

author: Chat GPT (2)
author_rank: Newbie
timestamp: March 14, 2023, 11:14:00 am
content: Designing a multi-stage RLC low-pass filter for an SMPS input can be a complex process, but there are a few general steps you can follow to get started:Determine the requirements: Start by determining the specifications for the filter, such as the cutoff frequency, attenuation required at specific frequencies, and the input and output impedances.Choose the filter topology: Based on the specifications, choose the appropriate filter topology. A common topology for multi-stage filters is the Butterworth filter, which provides a maximally flat response in the passband.Calculate the component values: Calculate the values of the components (resistors, capacitors, and inductors) for each stage of the filter using the chosen topology and specifications. This can involve complex calculations, such as solving differential equations for the filter transfer function.Simulate the filter: Use simulation software to model the filter and verify that it meets the specifications. This can involve adjusting component values and topology until the desired performance is achieved.Build and test the filter: Once the design is finalized, build the filter and test it to ensure it meets the specifications.When designing a multi-stage filter, it's important to consider the interactions between the stages. If the impedance of one stage is significantly different from the previous stage, it can affect the performance of the overall filter. In general, it's best to design each stage to have a similar impedance to minimize these interactions.To optimize the filter for a specific source Thevenin's equivalent circuit and load impedance, you can use circuit simulation software to model the filter and adjust the component values to achieve the desired performance. This can be a complex process and may involve iterating on the design multiple times to achieve the desired results.

author: kreyszig
author_rank: Regular Contributor
timestamp: March 15, 2023, 12:50:59 am
content: Quote from: T3sl4co1l on March 14, 2023, 03:00:57 amThank you, so I think this is consistent with the results I have as well. I reproduced your results in attachment. I also attached a time trace. Nice tool by the way!Quote from: T3sl4co1l on March 14, 2023, 03:00:57 amSorry, what do you mean exactly by optimizing for maximum impedance at the valley?Thank you!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 15, 2023, 01:42:22 am
content: Measure the impedance at V1 (or V(V1) / V1[ i] or whatever), you will see a valley at the frequency where the network is series resonant (gain peak).Tim

author: jonpaul
author_rank: Super Contributor
timestamp: March 15, 2023, 11:38:09 am
content: looking at this long thread seems the OP just needs a simple EMI filter.Faster solution is,a,stock,off the shelf EMI module. Depending on the current, voltage, EMI surpression db/ f and anticipated noise environment.Most EMI filters have a CM noise choke and some caps line..line and line..ground. Most have both CM and DM noise filtering.Seems like complication of a custom filter is not needed.Jon

author: kreyszig
author_rank: Regular Contributor
timestamp: March 17, 2023, 01:29:05 pm
content: Quote from: T3sl4co1l on March 15, 2023, 01:42:22 amHi Tim,I guess it is fair to say that using only linear components, the damping of a low pass filter and the average power it dissipates cannot be optimised separately? So critical damping or overdamping comes at the cost of extra average dissipated power. I assume it could be possible to achieve a better result for a power supply application by combining a filter that has good attenuation at high frequency, but not optimal damping, with a non-linear component that clamps down voltage overshoots by the filter? I assume it would be quite easy to do for fixed nominal input voltages, but more difficult when a range of input voltages are allowed? Thanks!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 17, 2023, 02:36:09 pm
content: Why not? Define the source voltage/current, impedance and spectrum.For example, a pile of electrolytics might have a truly abysmal Q factor, but the impedance can minuscule so that almost no signal power is dissipated (at frequencies much, much higher than 1/(ESR*C)).Indeed, for something like an SMPS, we can express this as a different kind of quality factor.Say we have an inverter driving an inductor -- a do-nothing machine, it just cycles reactive power endlessly. Inductor voltage toggles between +/-V, inductor current ramps between (+/-) Ipk = V / (4*Fsw*L). The current is alternately drawn and delivered to the supply, so there is instantaneous power flow, but it averages out to nearly zero. What is the supply ripple? If the current is drawn from a bypass capacitor of ESR + C, and Fsw >> 1 / (ESR*C), we can ignore C, and power dissipation is simply Ipk^2 ESR / 3.If we make ESR arbitrarily small in this example, power dissipation goes down too. This, even though we might have a very low damping factor of the C versus surrounding inductors (say for supply wiring, or between capacitors in parallel).There will be limits, but you will have to define the system to be able to express what kind of damping and power loss can occur.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 17, 2023, 06:01:31 pm
content: Quote from: T3sl4co1l on March 17, 2023, 02:36:09 pmI was comparing your filter with the snubber we discussed earlier to what is presented inhttp://jeroen.web.cern.ch/jeroen/reports/crfilter.pdffor example. With your design, the Thevenin equivalent impedance is 0 for DC and there is no resistance in parallel either, so the power dissipated by the filter is zero for DC (with ideal components obviously). However Cb needs to be infinite in order to cap the gain to 1. For the other filter, it is relatively easy to cap the gain, Thevenin equivalent impedance is still 0 for DC, but the parallel resistor makes dissipated power an issue, unless R and L are increased by a few orders of magnitudes and C is reduced by the same factor, in which case capacitance values become tiny, and attenuation performance greatly suffers. So this is why I was thinking about combining the first design with non-linear devices to clamp down the gain while retaining the great efficiency.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 17, 2023, 06:51:54 pm
content: Right, that filter requires a load termination. And you can't do the same thing at both ends, because there's no such starting point (a doubly-shorted filter!).Nonlinear devices don't help because, without a defined signal level, they all reduce to resistance or reactance anyways. Alternately, any such filter you provide, you will find some amplitude or bias at which the gain won't be clamped. Or, the devices don't normally participate at all, and the gain isn't limited at 1.0 at all but allowed to shoot up some amount -- but only so far (example: inrush clamping with a TVS, say from a nominal maximum of 12V, the unclamped and undamped overshoot would be 24V or more, but the TVS clamps it at maybe 16V).You're also not limited to the L + (C || (R+C)) circuit. Consider an (L || R) in series with the L, or multiple stages, or etc. Likely you can find a handy one where the zero can be canceled out.Indeed the trivial case is the symmetrical one. Just as a scope probe is an impedance divider where both impedance elements are a R || (R+C) network, so too we can make a filter with series L and shunt C, or a damped filter with L + (L||R) into C || (R+C). With equal time constants for the L/R and R*C, I believe you'll find the zeroes cancel out?Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 27, 2023, 04:06:17 pm
content: Quote from: T3sl4co1l on March 17, 2023, 06:51:54 pmIf I add a 0.5 Ohm series resistor to your circuit, damping becomes sufficient, at the cost of some added power dissipation. I was wondering if it would make sense to use a current limiting circuit that dissipates less heat under max DC current draw from the load, but that limits the current that goes through the filter inductor, e.g. to 0.35 A. That would provide a soft start feature at the same time.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 27, 2023, 07:59:08 pm
content: You could solve it for certain transient conditions that way, yeah, but not for overall dynamics -- it does nothing for small-signal response. Say the attached SMPS starts squealing (its negative resistance making an oscillator against the filter); the amplitude of that will be limited by the peak input current (which will be oscillating up and down), but it'll still be oscillating up to whatever amplitude it does, making things worse for everyone involved -- it might not malfunction outright, but it's more stress on components, somewhat less operating range (consider the effect on Vin(min)/max at Iin(max)), more input and output ripple, etc.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 28, 2023, 06:16:56 pm
content: Quote from: T3sl4co1l on March 27, 2023, 07:59:08 pmThanks. Here is what I came up with. The added circuit limits the current at startup and also allows to reach critical damping at 10 kHz, without consuming much power. I used R4 as a load (the chosen value represents the average maximum load). I included the results for both this circuit and a modified circuit with the MOSFET bypassed. The circuit does not seem to have much effect at all at frequencies significantly higher than 10 kHz, because the inductor constrains the ramp up of the current below the limit. I could probably get a better result with a different, faster OP amp. What do you think?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 28, 2023, 07:08:43 pm
content: Is source really 1V in all those cases? So the op-amp isn't even powered up? ...Or it's a linear model that doesn't care about its supply pins? (Except in the 12V step case.)The weirdest part I guess is putting the inductor between amp supply and ref points. It's part of the control loop, but it's weird. Not strictly within, but limited CMRR and gain mean it will have an effect. And overvolting the amp under certain transient conditions is probably not intended, but entirely possible, so, be careful about that too.You also have concerns about fault conditions, or how much C it can start up into (if applied generally). If the load is shorted, the op-amp will do its darnedest to keep current flowing, and after a few milliseconds, the MOSFET won't be having it. A timer and latch or auto-reset would be desirable. Which is basically the operation of any off-the-shelf load switch, wired-OR controller (if enable-able, not strictly wired-OR only), eFuse, etc. (Which isn't to be dismissive: you've basically at this point developed all the reasons why they exist, so feel free to make your own, or use them as you wish!)A couple of these could be addressed by moving the inductor into the drain circuit; then maybe a clamp diode from GND to address transient conditions (basically to make a buck converter, but not always operating in hard switching mode), and some R+Cs to dampen the inductor's oscillation, or condition the limiter's impedance, so it doesn't oscillate into the inductor for one, but also to provide some dynamic resistance too*. (That is, not R+Cs across the power components, but between drain and gate, or drain and -in (you'll need some resistance added from source to -in for that to work, and probably out to gate as well), which will be high impedances -- 100s pF and k ohms say.)*Realize that, as an analog control element, you can construct any impedance you like, here -- it doesn't need to be strictly current-sourcing. Indeed, it certainly won't be at high frequencies (FET Coss dominates if nothing else), but with judicious choice of feedback and impedances, the output impedance can be tailored over a wide frequency range as well -- as long as it remains in the linear range to have some control authority, of course. In other words, you can get the effect of series R, or R||L or whatever, without having to use those components (that would cost DC, or be bulky, otherwise), instead using small chip components and a control loop. But, obviously it can't control in that way, all the way down in saturation (low DC drop), it can only exhibit such behavior while limiting current.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 28, 2023, 08:47:06 pm
content: Quote from: T3sl4co1l on March 28, 2023, 07:08:43 pmNo I use a 12V DC offset whenever a sinusoidal source was used, either for the time trace or to look at the frequency response.Quote from: T3sl4co1l on March 28, 2023, 07:08:43 pmI use a Zener diode to supply the amp. When the current of the inductor flows back towards the source, the voltage at the input of the OP amp can be a bit above the voltage of the positive railQuote from: T3sl4co1l on March 28, 2023, 07:08:43 pmI intended to use a fuse for the circuit...Quote from: T3sl4co1l on March 28, 2023, 07:08:43 pmOk yes moving the inductor on the other side can lead to nice improvements. I also added a diode and a 1 uF cap + 10 Ohm resistor in series to remove the inductor oscillations (because of the extra cap, I think the diode does not really help anything though). See results in attachment. Also I include results where I pulse the full load on and off with the source set to 12 V DC.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 29, 2023, 02:24:43 am
content: Quote from: kreyszig on March 28, 2023, 08:47:06 pmIncluding AC steady state?QuoteI mean you'd have to test source open/short/rise/fall conditions to see these. Which after all, includes the inrush condition you're concerned with, but also stuff like unloading the inductor, which then puts voltage across the amp. You don't have an input cap after all, so input-open expects overshoot!QuoteTo protect the transistor? How?Suppose the output is shorted. The transistor blows in a hurry (100s us?), and the fuse opens. Alright, fair enough.Suppose the output is overloaded. The transistor dissipates say Vin/2 and blows in a hurry (200s us?). The fuse doesn't open because it's only seeing a bit above the limit. You re-plug the source, whammo, big fat inrush current. Transistor's toast, it's a dead short, no more limiting. What have you accomplished?The challenge isn't to make something that limits currentonce, that's easy as you can see.These things are surprisingly tricky. I've spent many years thinking about them on and off; I'm pretty comfortable with all the edge cases, but that was not always true. There is good reason why I recommended just leaving it passive! If you don't have a particular need to worry about inrush... just don't.QuoteNot badYeah, you won't see the diode do anything outside of large load step, or source opening under load.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 29, 2023, 03:04:09 am
content: I tried changing the amp for a faster one and it does indeed improve the result. I had to do some circuit adjustments to prevent ringing of the inductor. See results in attachment. The only issue I have now is that the two caps between the MOSFET and the inductor create a 5A current spike at startup, before the amp and the MOSFET have the chance to do anything.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 29, 2023, 03:45:42 am
content: Instead try an R+C from drain to +in. Should be able to get away with much less e.g. 10n instead of 1u to GND, or maybe none. But again, beware source transient conditions, and it only works while out of saturation.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 29, 2023, 03:54:09 am
content: Quote from: T3sl4co1l on March 29, 2023, 02:24:43 amI agree that the current MOSFET would toast if the output was shorted, but what if I select a transistor that can dissipate the 0.35A current across a 12 V drop (4.2 W)? If the output gets shorted the circuit would increase the gate voltage to reduce the current back down to 0.35A after a fraction of micro second, no? When I simulate it seems that the max current through the transistor is about 560 mA (the current goes above 350 mA for about 0.6us). Thanks!

author: kreyszig
author_rank: Regular Contributor
timestamp: March 29, 2023, 01:20:55 pm
content: Quote from: T3sl4co1l on March 29, 2023, 03:45:42 amI have been trying to get this working, with R+C between the input and the drain, but it is causing issues for the current that goes through the sensing resistor... Ideally if I could hold the gate voltage higher while the amp is getting powered up, that could limit the current going through the transistor...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 29, 2023, 05:03:29 pm
content: Hmm right it's only a couple watts, milliseconds then -- SOT-23 is only good for a watt in the best of cases, continuous. Pretty quickly Tj goes well over 150C and it's done. With say a DPAK and good heatsinking (or even a SOT-223 or SOT-89 might handle 4W), yes, that can be handled continuously.Quote from: kreyszig on March 29, 2023, 01:20:55 pmAre you still optimizing to constant current? That is the incorrect goal, when including dynamic behavior. It will settle to the same current, but more slowly, while the amount of extra current corresponds to that which the (large) R+C would've drawn.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 29, 2023, 06:06:06 pm
content: Quote from: T3sl4co1l on March 29, 2023, 05:03:29 pmSo after doing more tests, it seems the model for the p-channel MOSFET I have does not behave like the one for an enhancement type, as it conducts at t=0 with the gate disconnected. If I can fix this things should look much better?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 29, 2023, 07:02:28 pm
content: Well... that would be a problem!Never be afraid to open a new project and just test a model, run it through typical operating points, switching etc. Setups for Vgs(th) (G+D tied, biased with some, usually ~ < 1mA, see datasheet), transconductance (fixed Vds, sweep Vgs, measure Id), gate charge (IPULSE into gate, with clamping zener; voltage supply through resistor to drain, or CCS with voltage clamp) and so on.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 30, 2023, 12:33:09 am
content: Quote from: T3sl4co1l on March 29, 2023, 07:02:28 pmIs it the expected behaviour for an enhancement type p-channel MOSFET? I thought it was resistive by default, but I tried simulating two different models and I got a similar result...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 30, 2023, 12:57:11 am
content: That seems reasonable enough capacitance, but the steady-state current seems rather high.Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: March 30, 2023, 01:01:44 am
content: Quote from: T3sl4co1l on March 30, 2023, 12:57:11 amSo it is normal for it to be conductive for about 40 ns? Because it what is causing the initial current spike with my circuit, as a lot of current is flowing towards the capacitors on the other side of the MOSFET as the supply voltage is ramping up. I would need an p-channel type transistor that is turned off by default...Attached is how it looks like with the whole circuit. The current spikes up to 1.5A before the circuit has the chance to do anything...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 30, 2023, 05:08:50 am
content: Mind the scale, that's fifty nanoseconds per div! You've got tens of microseconds to get it under control, no worries!Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: April 01, 2023, 12:29:05 pm
content: Quote from: T3sl4co1l on March 30, 2023, 05:08:50 amI tested the circuit with a 1uH source inductance (2m of wire), and it was causing issues, as it was exposing the current-limiting circuit to lots of oscillations (no oscillation for the output but the current-limiting circuit was no longer properly doing its job). I added 20nF cap and 50nF cap + 7 Ohm resistor and it got rid of the oscillations. Does it make sense? I minimized the values for these caps to minimize the initial current surge. I will tweak the choice of components and redo all simulations.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 01, 2023, 07:12:23 pm
content: Sure. And again, maybe a TVS is warranted, for hot-plug inrush or automotive or etc.Speaking of auto, a similar circuit can be used to handle load dump; for example, LT's "surge stopper" line basically integrates this plus control logic to turn it off after a delay and restart.Tim

author: Terry Bites
author_rank: Super Contributor
timestamp: April 01, 2023, 08:01:39 pm
content: I'd start with am off the shelf job before diving in the deep end.For the input side there will be many units rated for the current and cut off frequency you want.You'll need filters for common mode and differential mode noise.The output is more likely to be the roll your own bit.Simple low pass sections need to be able to carry the current without saturating the inductor.You need to watch out for high Q and self resonances. You may need snubbers to prevent ringing.Before embarking on SMPS filter schemes you want to look at the wiring and PCB routing.Poor attention to detail here will create noise that no filter can eliminate.

author: kreyszig
author_rank: Regular Contributor
timestamp: April 04, 2023, 12:49:58 am
content: Quote from: T3sl4co1l on April 01, 2023, 07:12:23 pmThanks, I will look into those. I have looked at p-channel MOSFETs that could handle a short circuit, and it seems difficult to find one with a ~0.1 Ohm resistance and a low VGS voltage. I would most likely need to power the amp with 10V, but then it would slow down the current limiting circuit. Since this will be connected to the MP4576 that has itself over-current, hiccup short-circuit protections and a soft-start feature, how important do you think it is for the pre-filter to have short-circuit protection?

author: kreyszig
author_rank: Regular Contributor
timestamp: April 04, 2023, 12:57:21 am
content: Quote from: Terry Bites on April 01, 2023, 08:01:39 pmThank you. What would you suggest for an off the shelf filter unit that provides common & differential mode noise filtering for a 300 kHz SMPS and a 350 mA current-limiting functionality at ~12 V? The circuit that I have so far takes care of the current limiting and differential noise, but not the common noise.Regarding the SMPS, there has been quite a bit of discussion in this thread:https://www.eevblog.com/forum/projects/surge-protection-grounding-and-fail-safe-biasing-for-isolated-rs-485Thanks!

author: kreyszig
author_rank: Regular Contributor
timestamp: April 04, 2023, 01:26:51 am
content: For a common-mode choke, I assume something like this would work well?https://www.we-online.com/components/products/datasheet/744272332.pdfIt should not interfere with the proper functioning of my existing differential filter, correct?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 04, 2023, 06:14:48 am
content: Quote from: kreyszig on April 04, 2023, 12:49:58 amThis thread has been a refreshing exercise, but alas, now we come to the X-Y problem: what are you really doing here? Would you like to discuss your system (inputs and outputs, blocks within)?As I said before... if you don't need current limiting, don't bother! Is this powered by the MP4576? Or is that powered by it? Which way isn't clear. (Maybe it's both..!) Do any other features make sense e.g. voltage limiting, reverse protection? If you're not sure, then what is the environment -- battery, DC adapter, automotive, USB, etc.? Most likely, you don't need it at all, and just the filter is fine.As for EMI filtering, what's it connected to? List all ports/connections. Any particular levels to comply with? EMC is a holistic subject, and can be deeply affected by what's happening completely across the system -- you literally cannot provide too much information here. A single board (requires at least schematic and layout, and enclosure and wiring harness if applicable) can be evaluated for EMC, but that's no guarantee it will behave when placed inside a larger system. We can't encompass everything of course; sooner or later we'll need to use a model to represent a vehicle, or mains wiring, which introduces uncertainty (but within the standards with prescribe such methods, that's simply how it is).Tim

author: kreyszig
author_rank: Regular Contributor
timestamp: April 04, 2023, 05:39:26 pm
content: Quote from: T3sl4co1l on April 04, 2023, 06:14:48 amThe filter is to be powered by 12V DC through a ~1m cable that is getting power from one of the control ports of a HVAC air handler's PCB (the port has +12V, ground, low power +5V, RX, TX). The filter powers a SMPS that uses MP4576 (c.f.https://www.eevblog.com/forum/projects/surge-protection-grounding-and-fail-safe-biasing-for-isolated-rs-485). Since the filter itself can produce a current surge at startup, and due to the ability of the active circuit to achieve better damping than a filter without an inline resistor, I thought it was a good idea to use the proposed designQuote from: T3sl4co1l on April 04, 2023, 06:14:48 amThe SMPS is powering a non-isolated MCU, and also an isolated full duplex RS-485 transceiver. The MCU acts as a translator between the air handler's serial protocol and the RS-485 RTU protocol. The RS-485 transceiver is to be connected (A, B, Y, Z and ground) to other transceivers, some of which have only floating grounds through their power supply. Unfortunately, I have little information on the air handler's PCB, other that I know it can provide a bit over 3W of power based on some scarce documentation I could find, and other than what I can measure and reverse engineer. I don't have a particular EMI standard to comply with. I mostly want to protect the air handler's PCB and not cause interference issues that could degrade the RS485 transmission.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 05, 2023, 02:40:28 am
content: Ah yeah, that thing. Well, it only has to start up once, and if it works at all (source doesn't lock you out from momentary overcurrent?) it'll keep working, so I wouldn't worry about it, at least without trying it first, or with more information on the PCB.An LC at the inlet is probably enough, so, what you've done here, and the isolation will do a good job with EMI, give or take maybe a CMC on the power or '485, or some R+C (on the order of 100R + 100pF maybe?) across the isolation barrier to dampen ringing. Or maybe even just ferrite bead(s) on the power or 485 cables, instead of a CMC. But most of those won't really mean anything without testing and it's probably fine without, at least until you notice problems.Tim