DC Accurate Low Pass Filter for Complex Load ? - Page 1
Forum section: electronics / projects

author: LaserSteve
author_rank: Super Contributor
timestamp: July 05, 2024, 06:25:37 pm
content: I have a complex mechanical load in a PID loop that i need good DC accuracy for, but would like to low pass around 6-20 khz or so, adjustable on the bench for test, but frequency will be fixed in final design.I probably need a Bessel response for good group delay / accurate phase response.I rarely design filters.I'm told the basic idea is design the LP filter, and then make sure the load impedance is very high with a buffer to pass the DC component.Anyone have a way to pass accurate DC around a Low Pass? This needs to be in analog, as it is part of a concept for retrofitting a few hundred rental systems in the field that are getting broken by users. The new version of the control software provided by the users, with output in the form of an analog signal, is now capable of large signal swings outside the original traditional signals of the industry, and we're getting clobbered with broken servosystems. A limiter, and a low pass are needed, and there are already notch filters in the system. I've already got an excellent bipolar adjustable limiter design which required coming up with low leakage diodes etc,No its not a speaker, its driving galvanometer scanners. I'd post more details, but some less technical co-users of this forum would copy my post to a industry Facebook forum in a heartbeat just for "Why is he is asking for this?" Which has happened before...I'm aware of the LT/Analog devices Low Pass filter chips, and have some on order. I'd really like to leave the original command signal wave form intact as possible and just be NO Change in magnitude and phase to point X in the frequency domain, , then attenuate the daylights out of any signal component above frequency X... Course DC components change the position, and AC signals are the image. Think laser marking system with a lot of rapid course positioning changes. Final equipment is not a marker, but similar in concept.Carving out the suspect stuff with a high pass and then subtracting might be an option. The servo system amplifiers already have plug in notch filters in the feedback loop, but the problem is above the desired passband but well below the shaft resonances the notch filters are tuned at the factory for. No two units come with the exact same resonances. End users are mainly artists, and we avoid letting them retune anything like the plague.All this because a software firm changed owners and the new owner hired a new programmer who creates the amazing user interface, but cares less about the back end and has trashed a software based reconstruction filter by promising "More Speed". Its costing a lot of money for system owners who cannot lock out users from making changes. But version twelve is out, and its widely distributed, and is killing hardware. Software is by one party, end user hardware is by a lot of third parties, owners rent the gear, users kill it with their copy of the software out on the road. So the best I can do is design an add on board to go between the output DAC and the existing servo system.I need a really, really, clean transfer function.Yes, I know by definition, there is no free lunch in bandpass and Low pass design, which will show up as some minor corner rounding in the image no matter what.I'm trying to keep a lot of LF square waves basically intact.Any proven ideas?Steve

author: Benta
author_rank: Super Contributor
timestamp: July 05, 2024, 06:46:28 pm
content: DC is not really a problem for LP filters, DC precision is purely up to you keeping bias/offset currents and voltages under control.Get that right, then you can design the filter around it.

author: mawyatt
author_rank: Super Contributor
timestamp: July 05, 2024, 06:49:15 pm
content: Because of sensitivity and nature of your companies problem suggest they consider hiring a consultant rather than trying to find answers on a public forum.If this problem is causing serious money/reliability/reputation company issues, an expert consultant is easily justified.Best,

author: LaserSteve
author_rank: Super Contributor
timestamp: July 05, 2024, 07:04:39 pm
content: Small niche industry that buys parts intended for larger industries and repurposes them. While there are probably 30K systems in the field in the US alone, its an industry driven by the "Entertainment" establishment. Getting artists / promoters / financiers to follow instructions is well neigh impossible.I need 200 or so boards for my client, who is a friend. He can then get others on board. Systems run in parallel, so one rental user can kill a lot of hardware inadvertently.I am one of the few US hardware experts left. End user hardware now comes out of China, I have no control on the end.OK, at the risk that this leaks, lets remove the proprietary portion of my post,.

author: moffy
author_rank: Super Contributor
timestamp: July 06, 2024, 06:32:05 am
content: Ran into a similar issue with a Rogowski coil current amplifier, trying to keep the square waves square, and the killer was phase shift, 5 degrees shift over a decade frequency would noticeably distort the square wave (it was a high pass filter). What is the frequency range of square waves you need to keep square? The DC accuracy is not really an issue with low offset/low input current op amps, but bandwidth of the filter will relate to the settling time of a square wave.

author: nfmax
author_rank: Super Contributor
timestamp: July 06, 2024, 07:35:43 am
content: May I suggest a 'maximally flat delay with Chebyshev stopband' (Feistel & Unbehauen) design? This has a passband which basically a maximally-flat delay (Bessel) response but with added stopband zeros. I've used such a design as the basis of an anti-alias filter for the ADCs in an ultrasound system, mentioned here (with references)https://www.eevblog.com/forum/testgear/a-high-performance-open-source-oscilloscope-development-log-future-ideas/msg3331094/#msg3331094. There are design tables in Williams & Taylor.If it helps, you can tweak the frequencies of the stopband notches a bit: you lose the equiripple property but you can move the extra attenuation to the worst alias frequencies - or resonances in your case.Beware though: a maximally flat group delay is only achieved by increasing the overall delay: this may have serious ill effects on your PID loop. No free lunch!

author: jonpaul
author_rank: Super Contributor
timestamp: July 06, 2024, 07:58:09 am
content: Steve, DC accurate 6..20 kHz LPF for sq waves driving galvo? Surely a filter>>amp>>Driver is needed to run the galvo?We had worked in that problem in 1980s.1/If the LP freq and band cut parameters are choosen carefully, Bessel (for best phase/group delay) is rarely neededButterworth, etc should work fine.2/ Passive or simple RC/Opamp AF is easy to build.3/ See the fine app notes on LF AF design from BB, ADI, back to 1980s.4/ A passive LC filter has zero DC offset.The offset of an active filter is can be controlled by choice of opamp, impedances, etc.5/ See classic discrete passive LC /active filter texts with all toploogies, design proceedures, tables, values....Electronic filter design handbook: 1988 by Williams et al:https://www.amazon.com/Electronic-filter-design-handbook-digital/dp/0070704341Passive classic is "Handbook of Filter Synthesis" by Zverevhttps://www.amazon.com/Handbook-Filter-Synthesis-Anatol-Zverevhave an absolutely fantastic day!Jon

author: nctnico
author_rank: Super Contributor
timestamp: July 06, 2024, 08:37:06 am
content: Not sure whether the filter chips are a good optionIIRC these are typically based on a switched capacitor topology which has a limited bandwidth and noise. For maximum accuracy and lowest noise, I'd look at an active filter build from low offset, low noise opamps and high accuracy resistors for best dc performance. The biggest problem will be frequency accuracy as capacitors ans inductors have quite large tolerances.A first step would be to figure out how much phase margin the pid loop has. This will determine the maximum delay in the filter.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 06, 2024, 09:11:31 am
content: Is this a small-signal or active filter for conditioning, or for power output after the amplifier?The latter is perfectly feasible (inductors won't be wildly large) but we need to know the source and load impedances, as function of frequency, and especially what range the load might take, since I gather this might be connected to different things, or the load itself varies in operation (I'd think galvos are generally pretty stable, but don't want to assume).An active filter can simply be put together from any calculator tool, RC values rounded, some simulation to check that it works as intended (likely: Bessel's softness also means tolerant of component value errors*), and there you go. The downside is, amplifier noise is not filtered, and you gain the noise and distortion of the filter itself (from the amplifier(s) -- likely small, but definitely nonzero).*Technically just as sensitive as any other, but it's more likely you're only checking frequency response, not group delay, where component errors will have a stronger effect. You mention group delay should probably be flat, but, you'll have to decide how much flatness is acceptable (and how to measure it in simulation or IRL).Finally, one trick: prefer odd-order filters, as you get one pole almost for free:http://sim.okawa-denshi.jp/en/Sallenkey3Lowkeisan.htmMind that input may need to be buffered, in which case it's not actually for free, but your DAC probably has either an internal buffer (or an option to enable) which is practically free, or it has constant resistance (in which case it can be rolled into the leading resistor no problem, adjusting minimum RC values as required).Tim

author: mawyatt
author_rank: Super Contributor
timestamp: July 06, 2024, 12:34:10 pm
content: First question is how much delay can the "loop" tolerate, without this detail there's no point in even discussing what type LPF is required. Once the delay is defined then the amplitude response can be addressed and one can begin to consider filter types.Best,

author: nfmax
author_rank: Super Contributor
timestamp: July 06, 2024, 12:46:04 pm
content: Re-reading the OP, I’m wondering if the signal to be filtered is actually the setpoint of the PID loop, and not within the loop itself. That would make life much easier!

author: LaserSteve
author_rank: Super Contributor
timestamp: July 06, 2024, 01:14:48 pm
content: So this is a patch. It needs to go between the DAC board and the PID loop input stage.Some systems have an internal DAC. In other cases the user/renter plugs their analog signal in. Hence needing to intercept.When the galvo drivers were cloned in China, the. slew rate limiter, coil temperature. calculator, and notch filters were removed. For a long time the pads were even retained on the clone boards. The CTC was based on the RC4200 Analog Multipler which went obsolete. Eventually the notch filter plug in for damping the principal resonance returned.There are input gain, servo, LF damping, HF damping, and differentiator 20 turn pots that need to be tuned to match the galvo to the amp, plus the notch filter. The notch filter went away at first as the cloners didn't understand it, and probably saw no reason to invest in the test gear. Eventually the cost savings was overcome by the return rate of units returned, damaged by shaft resonance problems.No two units are the same due to very tiny machining, position detector, and mirror inertia differences.The PID loop is tuned using a visual test pattern. Industrial users tune for low ringing and best performance on a square wave, then match the response of the two mirrors on a scope, by re tuning the faster small x mirror to match the slower, larger y mirror. We tune to a transfer function defined by the test pattern at a given scan angle. Tuning is thus a bit of an art form.I have a very sopsticated clipper limiter working, based on the active one in the Nonlinear Circuits Handbook. Once plugged into the standard harness , that will stop the user's from driving the optical position sensor flag into the housing. This is a limited rotation moving magnet motor. Once the flag is bent or knocked off [ 0.040" thick piece of steel about 1.5 mm by 3 mm in size, the galvo pair is toast from a user stand point.That leaves problem "B". The cloners, catering to uneducatedcustomer demands, have opened up the mechanical scan angle to the point that the position sensor can become saturated or non linear. The loop can recover from a DC overdrive, however, HF ac transients in the control signal plus users running at maximum angle can exceed the loop bandwidth , take the position sensor well out of its agc and linearity corrector operating range, resulting in chaotic loop oscillations , and cook the drive coil. the 60 or so turn 3.2 Ohm coil expands, pushes itself out of the stator, strikes the rotor, and shorts out.Hence the concept of a gently sloping low pass, which will pass the design signal, but quash getting into the "Ballistic" region of the control law. The position sensor on a cheap clone is two photodiodes and an LED. The LED illuminates the flag, etc. The active current source drives the LED, with a resistor network feeding part of the A and B photodiode signal into the current source for linearity correction, known as "AGC" in the business.Newer designs have four photodiodes, to allow wider angles,but"cheap" rules and everything low cost is shipping with two.So part "C" of my board turns off the Laser Diodes on a "scan fail" condition. I have access to the raw position signal in most cases on a three pin header. But no two sensors have the samelevel or offset, so I look for ac components within a window.Simple slew rate limiters cause problems on long jumps in the graphics. Hence the desire to limit the control signals hf content. All it takes is the user cranking up the refresh rate slider and image size sliders in the control software, and instant 400$ mistake.Recent work by a very brilliant teamfirst resulted in a doubling of scan speed, then a 30 % increase.So high end systems exist, running at the physical limits of what a galvo can do. Hence the software folks , have no intention of rolling back the controls.Comparing the demand signal to the position feedback out doesn't help much, due to the fact that longer jumps are slow and short jumps are very fast, the mechanicl system is of course a delay.So I want to get rid of that HF content.It used to be the case that trained operators were sent out on tour. Now the artistic directors want control from their consoles. Thus "Don't do that!" does not work.I'll post some FFTs and scope shots as in a few days.Thank you all for re-educating me. My last position went from taking care of a few graduate labs to catering for the tech needs of four hundred or so students, both graduate and undergrad. So I was not doing much design for the past six years. I'd describe the job as 110% crisis managent, as Chemical Engineers are mainly trained in modeling systems.My old friends are asking for help as marketers have taken the industry over. It is no longer the domain of artists and engineers, as commodity systems have flooded the market.I need to run some FFTs and post a few schematics.Thanks..More to come.Steve

author: LaserSteve
author_rank: Super Contributor
timestamp: July 06, 2024, 06:20:21 pm
content: Schematics for a typical clone, and parts list. Modern clones have less test points, are duals, have two complete PID loops per board, and the notch filter is on the main board, not a plug in.678xx are the current most copied amplifier, and 6850 is an older one with a clear schematic. Parts on the amp are modified for different Galvo scanner models.6850 does not have a notch filter. Its there for learning purposes / better drawing.I attached a typical notch plugin, the problem is the clones just include that on the board, so not modular anymore.Ia and Ib are the photodiode currents from the position sensor.The RC4200 will not be installed.Yes, LM3886 makes a great power Op-Amp, under certain conditions. Do not expect it to work at unity gain, or as a follower, however.The position sensor flag can strike either the light blocking plastic chunk, or the excitation LED on some copies.More expensive systems have the excitation, flag and sensors at right angles to the shaft, plus travel limiting to prevent damage.

author: KE5FX
author_rank: Super Contributor
timestamp: July 06, 2024, 07:44:41 pm
content: Probably a naive question, but: why isn't this stuff done digitally? Why is there anything at all besides a power amp between the DAC and galvo?

author: LaserSteve
author_rank: Super Contributor
timestamp: July 07, 2024, 12:12:34 am
content: John, Your answer is "Cost" and R&D sunk costs.About 15 years ago, I said to several manufacturers, at a conference, lets go DSP... No, No, Too expensive. Too Difficult, Why would you want to do that, etc.The Marking Industry has it in spades. On the entertainment / medical / lidar side there is one beautiful DSP based amp for the US market, I have one for personal use:https://scannermax.com/products/mach-dspThere is your link, but a DSP based system is three to four times the cost of Analog for the base model, However, what it can do is amazing. In most cases, only one or two projector vendors are allowed to buy it, with some rare exceptions. Marketing agreements are a thing.Steve