diff --git a/docs/Kinematics.md b/docs/Kinematics.md index 92de88ad..401554f8 100644 --- a/docs/Kinematics.md +++ b/docs/Kinematics.md @@ -73,21 +73,24 @@ flow would result in poor print quality. To solve this, the "look-ahead" mechanism queues multiple incoming moves and analyzes the angles between moves to determine a reasonable speed that can be obtained during the "junction" between two moves. If -the next move forms an acute angle (the head is going to travel in -nearly a reverse direction on the next move) then only a small -junction speed is permitted. If the next move is nearly in the same -direction then the head need only slow down a little (if at all). +the next move is nearly in the same direction then the head need only +slow down a little (if at all). ![lookahead](img/lookahead.svg.png) +If the next move forms an acute angle (the head is going to travel in +nearly a reverse direction on the next move) then only a small +junction speed is permitted. + +![lookahead](img/lookahead-slow.svg.png) + The junction speeds are determined using "approximated centripetal acceleration". Best -[described](https://onehossshay.wordpress.com/2011/09/24/improving_grbl_cornering_algorithm/) -by the author. +[described by the author](https://onehossshay.wordpress.com/2011/09/24/improving_grbl_cornering_algorithm/). Klipper implements look-ahead between moves contained in the XY plane -that have similar extruder flow rates. Other moves are rare and -implementing look-ahead between them is unnecessary. +that have similar extruder flow rates. Other moves are relatively rare +and implementing look-ahead between them is unnecessary. Key formula for look-ahead: ``` @@ -158,20 +161,20 @@ To generate step times on Delta printers it is necessary to correlate the movement in cartesian space with the movement on each stepper tower. +To simplify the math, for each stepper tower, the code calculates the +location of a "virtual tower" that is along the line of movement. +This virtual tower is chosen at the point where the line of movement +(extended infinitely in both directions) would be closest to the +actual tower. + ![delta-tower](img/delta-tower.svg.png) -To simplify the math, for each move contained in an XY plane, the code -calculates the location of a "virtual tower" that is along the line of -movement. This virtual tower is chosen at the point where the line of -movement (extended infinitely in both directions) would be closest to -the actual tower. +It is then possible to calculate where the head will be along the line +of movement after each step is taken on the virtual tower. ![virtual-tower](img/virtual-tower.svg.png) -It is then possible to calculate where the head will be along the line -of movement after each step is taken on the virtual tower. The key -formula is Pythagoras's theorem: - +The key formula is Pythagoras's theorem: ``` distance_to_tower^2 = arm_length^2 - tower_height^2 ``` @@ -196,7 +199,7 @@ must also be used in the calculations. Should the move contain only Z movement (ie, no XY movement at all) then the same math is used - just in this case the tower is parallel -to the line of movement (its slope is 1.0). +to the line of movement. ### Stepper motor acceleration limits ### @@ -248,7 +251,7 @@ pressure. Pressure increases when filament is pushed into the extruder (as in [Hooke's law](https://en.wikipedia.org/wiki/Hooke%27s_law)) and the pressure necessary to extrude is dominated by the flow rate through the nozzle orifice (as in -[Poiseuille law](https://en.wikipedia.org/wiki/Poiseuille_law)). The +[Poiseuille's law](https://en.wikipedia.org/wiki/Poiseuille_law)). The key idea is that the relationship between filament, pressure, and flow rate can be modeled using a linear coefficient: ``` diff --git a/docs/img/corner-blob.jpg b/docs/img/corner-blob.jpg index 6dd529a0..eaf9024c 100644 Binary files a/docs/img/corner-blob.jpg and b/docs/img/corner-blob.jpg differ diff --git a/docs/img/corner-dimple.jpg b/docs/img/corner-dimple.jpg index 14cae0c4..55402d5e 100644 Binary files a/docs/img/corner-dimple.jpg and b/docs/img/corner-dimple.jpg differ diff --git a/docs/img/corner-good.jpg b/docs/img/corner-good.jpg index 687c73aa..812c82a5 100644 Binary files a/docs/img/corner-good.jpg and b/docs/img/corner-good.jpg differ diff --git a/docs/img/corner.svg b/docs/img/corner.svg index 3383a969..f2e3d0ef 100644 --- a/docs/img/corner.svg +++ b/docs/img/corner.svg @@ -102,8 +102,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.49" - inkscape:cx="27.644" - inkscape:cy="0.62950496" + inkscape:cx="95.030833" + inkscape:cy="-0.17370789" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -112,11 +112,11 @@ fit-margin-right="0" fit-margin-bottom="0" showborder="false" - inkscape:window-width="1920" - inkscape:window-height="1032" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="1"> + inkscape:window-width="1068" + inkscape:window-height="478" + inkscape:window-x="378" + inkscape:window-y="113" + inkscape:window-maximized="0"> image/svg+xml - + @@ -154,5 +154,31 @@ id="path3514-5" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> + move 1 + move 2 diff --git a/docs/img/corner.svg.png b/docs/img/corner.svg.png index c94ade20..12444e7c 100644 Binary files a/docs/img/corner.svg.png and b/docs/img/corner.svg.png differ diff --git a/docs/img/lookahead-slow.svg b/docs/img/lookahead-slow.svg new file mode 100644 index 00000000..fad4a6d9 --- /dev/null +++ b/docs/img/lookahead-slow.svg @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + time + velocity + + + + move A + move B + + + move A + move B + + diff --git a/docs/img/lookahead-slow.svg.png b/docs/img/lookahead-slow.svg.png new file mode 100644 index 00000000..80450e09 Binary files /dev/null and b/docs/img/lookahead-slow.svg.png differ diff --git a/docs/img/lookahead.svg b/docs/img/lookahead.svg index 4962a48a..b5c3df78 100644 --- a/docs/img/lookahead.svg +++ b/docs/img/lookahead.svg @@ -26,15 +26,15 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.94" - inkscape:cx="294.7319" + inkscape:cx="116.54041" inkscape:cy="45.708959" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1091" inkscape:window-height="588" - inkscape:window-x="107" - inkscape:window-y="116" + inkscape:window-x="149" + inkscape:window-y="422" inkscape:window-maximized="0" fit-margin-top="0" fit-margin-left="0" @@ -55,7 +55,7 @@ image/svg+xml - + @@ -110,11 +110,27 @@ id="path3361-7" inkscape:connector-curvature="0" sodipodi:nodetypes="cccc" /> - + move 1 + move 2 diff --git a/docs/img/lookahead.svg.png b/docs/img/lookahead.svg.png index eb822746..b40e256c 100644 Binary files a/docs/img/lookahead.svg.png and b/docs/img/lookahead.svg.png differ diff --git a/docs/img/trapezoids.svg b/docs/img/trapezoids.svg index b4ff5faf..541309c4 100644 --- a/docs/img/trapezoids.svg +++ b/docs/img/trapezoids.svg @@ -25,9 +25,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.94" - inkscape:cx="294.7319" - inkscape:cy="45.708959" + inkscape:zoom="2.67" + inkscape:cx="164.48301" + inkscape:cy="76.011989" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -55,7 +55,7 @@ image/svg+xml - + @@ -106,7 +106,7 @@ sodipodi:nodetypes="cccc" /> @@ -118,19 +118,22 @@ sodipodi:nodetypes="ccc" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" />