What does x256 interpolation mean ?
-
@hussainsail2002 When interpolation is turned on, the driver chip divides each micro-step into 16 smaller steps, then sends those 16 smaller step pulses to the motor. Note that it is the driver chip that does this, not the Duet board. Interpolation doesn't increase resolution because the duet board can only send a single micro step pulses, not a fractions of a micro-step. So 16x with or without micro-stepping will be exactly the same in terms of resolution, but the motors may be quieter when interpolation is turned on. If you want to increase resolution, then you have to use higher micro-stepping.
-
@deckingman good explanation but micro-stepping is not increasing resolution
-
Also note that the Trinamic driver chips that interpolate 16 microsteps to 256... those chips are keeping track of the rate (really time interval) at which the step (microstep) pulses arrive (sent from Duet's CPU), and adjusting the "outgoing" interpolated 256 step rate to match... as best it can.
"Best" being limited by the fact that the chip can only "look at" the past several incoming steps; it cannot see the future.
Anyway, the chip does track "velocity" via arrival rate, and does its best to match.
Net effect is quite nice.
-
@taconite said in What does x256 interpolation mean ?:
@deckingman good explanation but micro-stepping is not increasing resolution
It depends on the circumstances but increasing micro-stepping most certainly can increase resolution.
A situation that I often encounter with a mixing hot end, is that single digit mixing ratios can lead to extruder movement that is a fraction of a single 16x micro step. So if it's say 0.4 of a micro step, then that will get rounded down to 0 resulting in no movement. On the other hand, if the required extrusion amount resulted in 0.6 of a micro step, that would get rounded up to 1 micro step. Either way, significant errors can and do occur due to rounding when using 16x micro-stepping with a mixing hot end and single digit mixing ratios, because one cannot have a fraction of a micro step. In that situation, the resolution at 16x micro-stepping is too course and the only way to eliminate those errors is to increase micro-stepping to 128x or more.
So I stand by what I said "If you want to increase resolution, then you have to use higher micro-stepping".
-
@deckingman said in What does x256 interpolation mean ?:
So if it's say 0.4 of a micro step, then that will get rounded down to 0 resulting in no movement. On the other hand, if the required extrusion amount resulted in 0.6 of a micro step, that would get rounded up to 1 micro step.
Is this really the case? The firmware should keep track of the fractions and add them to the next step. So if you do 0.4 of step it will not move but after a second one it will and not on the third, and so on. So the amount deposited would still be correct when averaged over the path. If it really rounds a sequence of 0.4 steps always to zero that it a bug.
-
@nophead said in What does x256 interpolation mean ?:
@deckingman said in What does x256 interpolation mean ?:
So if it's say 0.4 of a micro step, then that will get rounded down to 0 resulting in no movement. On the other hand, if the required extrusion amount resulted in 0.6 of a micro step, that would get rounded up to 1 micro step.
Is this really the case? The firmware should keep track of the fractions and add them to the next step. So if you do 0.4 of step it will not move but after a second one it will and not on the third, and so on. So the amount deposited would still be correct when averaged over the path. If it really rounds a sequence of 0.4 steps always to zero that it a bug.
Yes it is real and something that I have done a fair amount of investigation into as detailed here https://somei3deas.wordpress.com/2018/06/08/why-16x-micro-stepping-is-a-bad-idea-with-mixing-hot-end/
and more recently here https://somei3deas.wordpress.com/2019/07/22/mixing-hot-end-extruder-micro-stepping-revisited/
-
@deckingman Well the fix is simple. You just accumulate the E steps converting them from relative to absolute, like the other axes and then you don't lose anything as each move is rounded to the nearest microstep but the total stays accurate.
Or alternatively carry forward the rounding errors:-
0.4 no step, carry 0.4.
0.8 step, carry -0.2
0.2 no step, carry 0.2
0.6 step, carry -0.4
0.0 no step carry 0.0
repeat, so every five 0.4 steps we should move two microsteps. -
@nophead I really don't want to spend time re-typing everything that I did in those two blog posts. Suffice to say that there is no sign of over or under extrusion on a cumulative basis over a number of segments. That isn't the issue.
-
@deckingman yeah you are right ... I got lost in the terms. Resolution increases - accuracy decreases
-
@nophead said in What does x256 interpolation mean ?:
@deckingman Well the fix is simple. You just accumulate the E steps converting them from relative to absolute, like the other axes and then you don't lose anything as each move is rounded to the nearest microstep but the total stays accurate.
Or alternatively carry forward the rounding errors:-
0.4 no step, carry 0.4.
0.8 step, carry -0.2
0.2 no step, carry 0.2
0.6 step, carry -0.4
0.0 no step carry 0.0
repeat, so every five 0.4 steps we should move two microsteps.That's more or less what RRF does, although the code to do that didn't work properly in older versions. I fixed it in firmware 2.02.