Flex Compensation for Winch Kinematics

Hi I’m the Hangprinter dev. I have implemented a (or actually, two) general flex compensation algorithm(s) for the winch kinematics. Any interest in merging this upstream?

Attaching some before/after screendumps of simulation results.

It supports any purely translational cable robot configuration that has a central effector, including SpiderCam-like setups (all anchors high up), Slideprinter (2D robots), HP3-like setups (one high, several low anchors).

See Torbjørn Ludvigsen / hangprinter-flex-compensation · GitLab for the algorithm development.
See GitHub - tobbelobb/klipper: Klipper is a 3d-printer firmware for my klipper fork.

The old ReprapFirmware flex compensation need to be updated to this new algorithm which is better in every way (more correct, stable, flexible etc).

1 Like

The “Print Logo” and “Print Squares” over at HP Simulation now do flex compensation.
See klipper/docs/Config_Reference.md at master · tobbelobb/klipper · GitHub for documentation on how to configure flex compensation.

The physical properties of the simulated machine are described here:

github: tobbelobb/hp-sim5/blob/main/examples/usd_scenes/slideprinter_multi_unit.usda
github: tobbelobb/hp-sim5/blob/main/examples/klipper/slideprinter/printer-slideprinter-linux-mcu.simple.cfg.incl_extruder_and_heatbed

Interesting, thanks.

Note that the “winch” kinematics has also been used for a type of high-speed printer separate from the traditional "hang printer designs - see Winch Kinematiks Missmatch .

@Roetz4.0 - fyi.

-Kevin

Hi, the algorithms will totally work for the Minuteman. It’s actually very similar to the Slideprinter simulated machine that made the plots above.

The Minuteman makers say they need their cables to run under contant tension, which they say was quite a pain to get dialled in. I think one reason for that is because the current winch algorithm assumes zero tension and perfectly stiff cables. If pretension is present (due to gravity and/or motors fighting each other), it will pull the effector off its intended position (typically towards the middle of the reachable volume) and forces will get very large.

With flex compensation it should be at least somewhat easier for Minuteman to dial in the right amount of pretension since a min- and max-force limit, as well as “theoretically correct” forces are enforced (within theoretical bounds).

The algorithms are designed to work for every cable driven design with lines connected to a central effector. I’ve tested that the following setups work well within the reachable area/volume, and work “ok” (least squares approximation or otherwise sensible values) outside of the reachable volume/area:

  • One high anchor, three low
  • One high anchor, four low
  • 2d machine, three anchors
  • Four high anchors (like the famous SkyCam)

They have to configure some things differently, details in the config reference.


Here’s an image where I have forced the Slideprinter to run with (only a few mm of) pretension in the lines, but no flex compensation in Klipper. The blue squares are the reference path, plotted directly from the gcode file, the green squares were “extruded” by the Slideprinter. We see that the green squares are smaller than the blue squares, because the whole Slideprinter is pulled towards the middle.

In the simulation, the pre-stretch in each line was set to a constant number of mm, and none of this stretch ever wound up on any of the spools. So reality will be a tiny bit different. I don’t have a setup to do the physical experiment right now. Modelling effect of tight/stretched line on the spools themselves, as well as line buildup, is on the roadmap for the simulator.

By the way your were spot on in the Minuteman thread about this: “when the bed carriage is in a positive Y position then the two top steppers have the string wrap around the top pulley a bit more and thus the effective anchor point is slightly closer to the Y origin.” Here’s a paper about it: https://www.researchgate.net/publication/316606621_On_the_effects_of_the_design_of_cable-Driven_robots_on_kinematics_and_dynamics_models_accuracy

The Minuteman also used input shaping, which worked well for the Benchy chimney (close to the origin) but less for the hull (further from the origin). This makes sense because eigenfrequencies of a cable driven robot depend on position, and they calibrated the input shaping at the origin. But the eigenfrequencies also depend on pretension, so I suspect they weren’t able to keep the positive effect of input shaping across a power cycle (unless they have some awesome initial pretension tuning mechanism).

Thanks for pointing me to the Minuteman. I rarely see hands on experimentation with cable driven robots being posted in such detail.

will this work with klipper ? im ready to build a kit and test it out if it does work :slight_smile: thanks a lot