Dreadful closed loop performance
-
I have built a few XY pen plotters using the Duet platform now (cartesian system, no Z axis) and decided to make one that is closed loop. The past few have worked fine in open loop mode but seeing that I needed to implement external drivers (3x 1HCL boards) and new stepper motors, I decided to give closed loop a shot.
Here's the issue: after tuning the steppers manually according to the wiki, plotted performance is dreadful--the characters plotted are pretty poorly formed. In open loop mode, they are practically perfect quality, but the whole system is much louder and rougher. Closed loop operation (mostly when using the default values, i.e. R100 and everything else 0) is much quieter and smoother, which I'd like to achieve.
3x igus belt driven actuators are driven by steppers with internal quadrature encoders. There is 1x actuator for X, and 2x for Y. The stepper motors I thought seemed a good choice for closed loop control if I was going to use the quadrature encoders and not the Duet magnetic encoder. What's nice about these particular encoders is that they are both incremental and absolute--which may help with a few future applications.
At any rate, the steppers are MinebeaMitsumi M17PMFA34CMB03, 1.5mH inductance per coil and integrated 4000PPR (16000 CPR) quadrature incremental encoders.
I think I'm just not experienced enough to know how to dial in all the closed loop parameters properly. My parameters are set like this:
M569.1 P30.0 T2 C4000 E5:10 R26 I1400 D0.25 V1100 A80000 ; Y0 actuator M569.1 P31.0 T2 C4000 E5:10 R26 I1400 D0.25 V1100 A80000 ; Y0 actuator M569.1 P32.0 T2 C4000 E5:10 R16 I1500 D0.25 V400 A40000 ; X actuator
I can share more info about the setup, the tuning process, specifications, etc. I'm not sure where to go from here.
-
@usinjin which firmware version are you using? We made big improvements (including making the motors run more quietly) between 3.4 and 3.5.
-
@dc42 Running 3.5.0-rc3.
-
@usinjin My impression about incremental encoder reading is: these sensors flood the MCU with tons of interrupts. (not RRF nor Duet3 related)
Some MCUs have hardware encoder inputs for a good reason...
A magnetic sensor OTOH can be polled by the MCU when it fits the schedule. Plus they have higher resolution. -
First off, I am no expert with tuning the 1HCLs. That being said I have been using them since they first came out.
I would drop your D value down to D0.1. That will immediately quiet them down, and I found it to have little impact on the performance.
I would also increase your P value. The auto tuning function tried setting my P value down in the 20-ish range like yours and I noticed very poor performance. Just for testing sake I would try a higher number like R100.
The other thing that might help is to post a picture of your tuning graph.