摘自https://reprap.org/forum/read.php?1,739819,作者是Paul Wanamaker,里面夹带了一些自己的理解
原文如下:
The following will illustrate how Junction Deviation and Acceleration work together for smooth cornering.
Intro:
Printer controllers use a motion control program to plan the timing of every step. Motion controllers based on GRBL use a cornering algorithm called Cornering Junction Deviation, which I'll focus on here. (Other firmware use a different algorithm called Jerk which may be implemented differently - I am not discussing Jerk here.)
I've been researching Junction Deviation as part of my research into pressure compensation.
In layman's terms:
- Junction Deviation determines how tight the controller's motion planner sees an upcoming corner to be.
- Acceleration controls how sharply the breaks and gas pedal are applied.
- The smaller the Junction Deviation, the slower the cornering speed will be.
- Don't worry, the term "Junction Deviation" doesn't mean the printer will deviate from it's course!
I wanted to be able to visualize the effect that Junction Deviation and Acceleration have on cornering speed and segment time. So I extracted and "functionated" the Junction Deviation calculation from Smoothieware and created a visualizer for my use, and these screenshots are the result.
The most critical inputs to the calculation are the Acceleration, Junction Angle, and the Junction Deviation, where Junction Deviation is a number between 0 and about 1 (numbers over 0.5 are ridiculous tho). I won't go into the details of the equation here, I'm focusing on the effects.
图中的δ为节点偏差,该值可以做为一个参数来限定通过该点的最大速度,利用向心加速度公式估计该值,作者的另一篇文章详细说明了该值的快速计算方法,见https://onehossshay.wordpress.com/2011/09/24/improving_grbl_cornering_algorithm/
The top plot shows the cornering speed at different junction angles for a maximum printing speed of 40 mm/s, given the inputs on the right. A 90 degree junction angle is simply a 90 degree corner between two segments. The red line shows where the target angle intersects the travel speed - giving the cornering speed for the given angle.
The middle plot shows the cornering speeds for up to a 150 mm/s travel speed.
If the acceleration is the same, then the plots for printing and travel are identical (up to the maximum print speed).
When printing a 90 degree corner: the effector will slow to about 15mm/s given the junction deviation of 0.100 and 1000 mm/sec Acceleration. Increasing either the Junction Deviation or the Acceleration will shift that line up, and the machine will corner faster.
The bottom plot shows a simulation of:
- two printing segments with a 90 degree corner between them,
- and then two travel segments with a 90 degree corner between them.
Each of these pairs of segments shows a dip in the center down to 15 mm/s - this is the cornering speed at the target 90 degree angle.
The motion for each pair of segments in detail is: Accelerate from 0 to the requested speed, speed is flat to before the corner/junction point, decelerate to junction speed between segments, accelerate back to the requested speed in the next segment, speed is flat to before end of segment, decelerate to 0.
If Junction Deviation was not used: the printer would just try to slam around the corner at full speed, and that would cause many problems (lost steps, extreme vibration, etc). If I could turn Junction Deviation off, then the plot of each pair of segments would not dip in the center.
There is one other parameter used with Junction Deviation: "Minimum Planner Speed" in Smoothieware.
For my screen I labeled it "Minimum Junction Speed" as I think that better describes it.
Notice at the beginning of the first two plots there is a knee, it starts out with a speed of 0, and then jumps up suddenly at about 18 degrees. This is a hardcoded "feature" of the J.D. calculation as it was implemented - any angle below about 18 degrees is considered essentially 0 degrees, and the "Minimum Planner Speed" is used.
If you want to make very sharp corners print faster then you can increase the "Minimum Planner Speed" from the default 0 mm/s.
Notice also that at about 162 degrees there is a sharp rise to full speed. This is also how J.D. was implemented - nearly strait angles more than (180 minus 18 degrees) are considered strait.
18度以内的角度,与0度的性质一致,直接采用最小规化速度进行规划即可;与之相对应,162度-180度之间的角度,与180度性质一致,不减速,按直线处理即可。
For comparison the following shows what happens if junction deviation is increased to 0.300. The cornering speed at 90 degrees has increased from about 15 mm/s to about 27 mm/s. That could well be enough to cause ringing - depending on the printer.
The bottom plot shows a simulation of:
- two printing segments with a 90 degree corner between them,
- and then two travel segments with a 90 degree corner between them.
Each of these pairs of segments shows a dip in the center down to 15 mm/s - this is the cornering speed at the target 90 degree angle.
The motion for each pair of segments in detail is: Accelerate from 0 to the requested speed, speed is flat to before the corner/junction point, decelerate to junction speed between segments, accelerate back to the requested speed in the next segment, speed is flat to before end of segment, decelerate to 0.
If Junction Deviation was not used: the printer would just try to slam around the corner at full speed, and that would cause many problems (lost steps, extreme vibration, etc). If I could turn Junction Deviation off, then the plot of each pair of segments would not dip in the center.
There is one other parameter used with Junction Deviation: "Minimum Planner Speed" in Smoothieware.
For my screen I labeled it "Minimum Junction Speed" as I think that better describes it.
Notice at the beginning of the first two plots there is a knee, it starts out with a speed of 0, and then jumps up suddenly at about 18 degrees. This is a hardcoded "feature" of the J.D. calculation as it was implemented - any angle below about 18 degrees is considered essentially 0 degrees, and the "Minimum Planner Speed" is used.
If you want to make very sharp corners print faster then you can increase the "Minimum Planner Speed" from the default 0 mm/s.
Notice also that at about 162 degrees there is a sharp rise to full speed. This is also how J.D. was implemented - nearly strait angles more than (180 minus 18 degrees) are considered strait.
For comparison the following shows what happens if junction deviation is increased to 0.300. The cornering speed at 90 degrees has increased from about 15 mm/s to about 27 mm/s. That could well be enough to cause ringing - depending on the printer.
参考资料