It seems as though we still can’t hit the ceiling on better control schemes for 3D Printers. Input Shaping is the latest technique to land on our radar, a form of resonance compensation that all but eliminates the ghosting (aka: vertical ringing) artifacts we see on the walls of printed parts. While the technique has been around for decades, only recently did [Dmitry Butyugin] both apply it to 3D printer control and merge their hard work into the open source firmware package Klipper. Once tuned, the results are simply astonishing–especially since this scheme can augment the print quality of even the most budget printer.
Assuming your 3D printer isn’t infinitely stiff, when your nozzle moves from point to point or changes direction, it vibrates in response to having its speed altered. The result is that the nozzle wobbles along the ideal path it’s trying to track. The result is ghosting, an aesthetic blemish that looks like vertical waves on the sides of your printed part.
Input Shaping is a feed-forward controls technique for cancelling the mechanical vibrations that create ghosting. The idea is that, if we wanted to move the machine from point to point, we send it two impulses. The first impulse kicks the machine into moving and the second impulse follows up at a precise time to cancel the vibrations we would see when the machine comes to a stop. Albeit, moving any machine by sending it two impulses is pretty crude, so we take these impulses, adjust their amplitudes so that they sum to 1, and convolve them with a control input signal that we’d actually like to send it. The result is that the resonance cancellation part of the signal seamlessly “mixes” into the control input signal, and the machine moves from point to point with significantly less vibration at the end of the travel move. For more info on the maths behind this process, have a look at the first four pages of this paper from [Singh and Singhose].
The only hiccup is that you need to do some up-front system characterization of your 3D Printer running Klipper before you can take advantage of this technique. Thankfully the Klipper update comes with a set of step-by-step instructions for characterizing your machine up-front. After a couple test prints to measure the periodicity of your ringing, you can simply apply your measurement results to your config file, and you’re set.
Input Shaping is a prime example of “just wrap a computer around it!“–fixing hardware by characterizing and cancelling unwanted behaviors with software. If you’re hungry for more clever, characterized hardware control schemes, look no further than this Anti-Cogging algorithm for BLDC Motors. And for a video walkthrough of the Klipper implementation, have a look at [eddietheengineer]’s breakdown after the break.
Does your 3D Printer run Klipper? We’d love to see some of your Input Shaping results in the comments.
Continue reading “Control Theory Spellcasting Banishes The 3D Printing Ghosts”