Welcome! Log In Create A New Profile

Advanced

Real acceleration during jerk

Posted by ArtemKuchin 
Re: Real acceleration during jerk
February 27, 2019 08:28AM
Quote
ArtemKuchin
I don't know about reprap software, but marlin seem to use jerk as starting speed from zero. Yes, it is a threshold speed. For speed below JERK acceleration is not used, for speed = or > JERK acceleration is used. Again, i am talking about marlin firmware, sorry.

So, if motor starts at JERK the firmware pulses to drivers STEP input at frequency which will result in JERK speed (taking into account steps/mm settings).

If the firmware suddenly applies pulses corresponding to the jerk speed, the motor will lag behind the commanded position due to its inertia. The more it lags, the higher the torque it produces, up to a lag of 1 full step at which point the torque reduces again. The increasing torque helps it to catch up. If the configured jerk is too high, the lag will eventually reach 2 full steps. At this point the torque is zero, and further lag will reverse the torque, causing 4 full steps to be skipped. But if the lag doesn't get that high then the motor will gradually catch up with the desired speed.

I find it strange that Marlin has implemented S-curve acceleration, which aims to limit the 3rd derivative of position, but if what you say is true then it still uses jerk at the start of moves, which causes the commanded 2nd derivative of position to be infinite. Or does Marlin not apply jerk to the start of moves when S-curve acceleration is enabled?



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Real acceleration during jerk
February 27, 2019 08:45AM
What you say it is true, but it is very generic. "up to 1 step", "reach 2full steps" - that's possible maximum conditions, but not real life conditions. As i said, i am sure, from real world experience, that lag is far less and that's exactly i need to know - the real lag.

Marlin has S curve and Junction deviation. They may be turned on or off (back to usual jerk stuff).
When JD is used the jerk is not used, but there is minium planner speed which may or may not be used in marlin with JD, it is not clear and i don't have the answer to my question about it on github.

But the question about jerk still applies, because jerk is just a case of sudden start at some speed. for example, x axis move then stops and y need to continue right away, so, y will pick up not from zero, but at some speed. It may be jerk or may be some speed calculated by JD algorithm, but still, it is not acceleration from zero.
Re: Real acceleration during jerk
February 27, 2019 09:05AM
You can calculate the lag as a function of time by solving the differential equations of motion. They go something like this:

commandedPosition = jerk * t
d(actualPosition)/dt = torque * sin(commandedPosition - actualPosition) * actualHoldingTorque / momentOfInertia

where the jerk needs to be expressed in motor shaft radians/sec, and the moment of inertia is not only the rotor inertia but also the mass of the carriage being moved as seen through the belt and pulley.

Junction deviation is still jerk (in the 3D printer sense), but the amount to use as a function of the difference between the initial and final movement angles is calculated in a different way.

The only case where jerk really needs to be used on the axes is when printing curves that are approximated as line segments. With zero jerk, the head would have to come to a momentary stop at the boundary between each pair of segments. Allowing jerk allows the speed of the move to be maintained across those boundaries, if the movement speed is low enough and allowed jerk high enough.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Real acceleration during jerk
February 27, 2019 09:14AM
Aha, i figured the equation already, not in the differential form, but same stuff eventually.

Yes, JD is still jerk in 3d printer sense. On the other hand, what is NOT jerk? Really, even when you accelerate the motor
you have to change the speed from zero to v1 and then to v2=v1+delta then v3=v2+delta, so, delta is jerk.
At what threshold would you start calling this delta not acceleration but jerk? smiling smiley
Re: Real acceleration during jerk
February 27, 2019 09:25AM
Quote
ArtemKuchin
Really, even when you accelerate the motor
you have to change the speed from zero to v1 and then to v2=v1+delta then v3=v2+delta, so, delta is jerk.
At what threshold would you start calling this delta not acceleration but jerk? smiling smiley

AFAIK Marlin still does it that way, but RepRapFirmware hasn't done it that way for around 5 years, and Smoothieware more recently switched from doing it that way too. RRF calculates when the motor should have moved by an amount corresponding to one microstep, and generates the step pulse at that time, normally to within an accuracy of a few microseconds. Then it calculates the time when it should have moved another step, and schedules that step; and so on. So it's only at the level of individual microsteps that the commanded motion isn't completely smooth.

Edited 1 time(s). Last edit at 02/27/2019 09:26AM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Real acceleration during jerk
February 27, 2019 09:32AM
"RRF calculates when the motor should have moved by an amount corresponding to one microstep"
Even if it know full system inertia it still cannot know when it moved or not, because the nature of microstepping itself is such that a due to manufacturing differences the ustep may or may not happen. So, i don't understand this statement.

the delta in my example is usual acceleration, How else any firmware can accelerate? The question was when do you call it acceleration and when do you start calling it a jerk?
Re: Real acceleration during jerk
February 27, 2019 09:37AM
Quote
ArtemKuchin
What does it have to do with jerk in a sense used in 3d printing firmware?

Just humor ! Jerk has yet an other meaning than discussed here.

Edited 1 time(s). Last edit at 02/27/2019 09:50AM by MKSA.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: Real acceleration during jerk
February 27, 2019 09:39AM
I know, but don't you think that this topic already has too much irrelevant text?
Sorry, only registered users may post in this forum.

Click here to login