Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    S-Curve/ sinusoidal , Jerk +acceleration

    Scheduled Pinned Locked Moved
    Firmware wishlist
    30
    83
    20.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dc42undefined
      dc42 administrators
      last edited by dc42

      I think the last 2 comments in this thread are quite a good summary: https://www.reddit.com/r/3Dprinting/comments/ccvn0z/is_junction_deviation_better_than_using_normal/

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @dc42
        last edited by

        An incidental possible advantage of reducing the cornering speed more as the cornering angle increases is that the reduction in the jerk used when you do 90 degree corners would make dynamic acceleration adjustment more effective.

        Perhaps we should provide the following factors:

        1. An effective maximum XY jerk value, used when cornering at shallow angles. When cornering, the speed times the sine of this angle must not exceed that jerk value.
        2. A factor that says how much to reduce the jerk by when cornering at 90 degrees. This would be zero to emulate the existing jerk algorithm, and about 0.4 to emulate junction deviation. A value of 1.0 would require coming to standstill when doing a 90 degree corner.

        We could go further and add a third point, which is the factor to reduce jerk by when reversing direction (cornering at 180 degrees).

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 1
        • dc42undefined
          dc42 administrators
          last edited by dc42

          Here is a chart showing the differences between jerk and junction deviation at various cornering angles. The two jerk values were for entry angles of 0 degrees and 44.9 degrees. Jerk was set to 10mm/swc for both X and Y, acceleration to 1000mm/sec^2, and JD was set to 0.013 so as to match the 0 degree jerk values at low angles.

          JerkVsJD.png

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • botundefined
            bot
            last edited by bot

            First: I appreciate all the effort, work and thought that is put into RRF by everyone, but especially dc42.

            Second: RRF 2.0x IMO has a GREAT and 100% adequate motion model. I am able to PRINT at 100 mm/s, with jerk and acceleration set appropriately, and have ZERO ringing on very sharp angled corners. [Edit: this turned out to be slightly incorrect. At the time I made this comment, I was doing certain prints at 100 mm/s that did not show the low-frequency oscillation that was occuring. I can NOT print at 100 mm/s -- I get an ultra low frequency oscillation above about 40 mm/s, increasing in amplitude as speed increases] There is also minimal bulging/under-or-over extrusion on the corners, thanks to pressure advance.

            Third: I could see areas where we could push the limits and decrease print time slightly while maintaining PERFECT print quality.

            This third point is the key. Let's not go ruining something that is nearly perfect for something that is not even close to perfect but a bit faster. Mechanical hardware plays a large role in this. I hope we don't target faulty mechanical setups with the motion algorithms.

            One simple idea I had was to be able to scale the jerk and accel (or only one or the other) based on requested move speed.

            EG: user sets max accel and jerk values, which will be used on moves which execute at the axes' maximum feedrates. If a feedrate is set lower than the maximum, the jerk and/or accel values are scaled proportionally to the feedrate reduction.

            *not actually a robot

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @bot
              last edited by

              @bot said in S-Curve/ sinusoidal , Jerk +acceleration:

              EG: user sets max accel and jerk values, which will be used on moves which execute at the axes' maximum feedrates. If a feedrate is set lower than the maximum, the jerk and/or accel values are scaled proportionally to the feedrate reduction.

              Scaling jerk in this way might be good. Scaling acceleration may increase ringing. One of the reasons that DAA doesn't work for some users is that they have acceleration set too low.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 1
              • A Former User?
                A Former User @deckingman
                last edited by

                @deckingman said in S-Curve/ sinusoidal , Jerk +acceleration:

                Except that any print move, will take place at the lowest speed of X, Y and E.

                I think I read this already somewhere but I understand it differently ... e.g. if there's no ZE move but only XY then ZE will not be looked at right... now.. the way I imagine XY move (and then easily interpolated further) ..

                let's imagine a junction where direction change in X is 10 degree and direction change in Y is 1 degree so if the deviation/jerk/whatever is same for X and Y the drop in X speed should be f(10) and drop in Y speed should be f(1), real speed should be the max speed where X does not go over f(10) nor Y go over f(1)...

                but I fear it's not how it works

                dc42undefined 1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @A Former User
                  last edited by

                  @smece said in S-Curve/ sinusoidal , Jerk +acceleration:

                  let's imagine a junction where direction change in X is 10 degree and direction change in Y is 1 degree so if the deviation/jerk/whatever is same for X and Y the drop in X speed should be f(10) and drop in Y speed should be f(1), real speed should be the max speed where X does not go over f(10) nor Y go over f(1)...
                  but I fear it's not how it works

                  That's exactly how it works.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  A Former User? 1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User @dc42
                    last edited by

                    @dc42 hah, that's not how I read the code πŸ˜„ πŸ˜„ πŸ˜„ need to do it rested obviously πŸ˜„

                    thanks a ton for that graph, explains everything :D, now I understand better the difference in curve shape

                    btw the "smoothing" I mentioned from klipper, RRF don't do that? you think that's a good feature? to me it looks like a good middle ground between trapesoid and s-curve and good for both corexy and cartesian

                    1 Reply Last reply Reply Quote 0
                    • CCS86undefined
                      CCS86 @dc42
                      last edited by

                      @dc42 said in S-Curve/ sinusoidal , Jerk +acceleration:

                      What I am looking to do at the same time as implementing S-curve acceleration is to replace jerk by junction deviation, but for the deviation to be planned instead of mythical. This will make it possible to eliminate attempts to change the speed of the motor instantaneously. In fact i see little point in implementing S-curve acceleration without tackling jerk (i.e. commands to change motor speed instantaneously) at the same time, because instantaneous speed change is much worse than instantaneous acceleration change.

                      When implementing S-curve acceleration, you can either keep the peak acceleration constant (which lengthens the acceleration time, and hence printing time), or you can increase the peak acceleration so as to keep the acceleration time constant. Lengthening the acceleration term in itself reduces ringing in most cases. So where S-curve acceleration has been reported to improve print quality, it may actually be the increased acceleration time that is making the difference. Also, the Bezier curve implementation of S-curve acceleration in Marlin has the side effect of reducing average acceleration when the acceleration takes place over several short segments, for example when printing curves.

                      I do expect S-curve acceleration to improve the sound of the printer when cornering; although I think there are probably easier ways to do that.

                      Hey @dc42 , any progress on these plans? I am excited by this prospect.

                      I agree that a planned junction deviation would be a huge step forward, not requiring so much jerk to get around corners. Instead seeing them for what they are. Getting to a place where acceleration is a more important factor in driving around an arc, would minimize the use of jerk and maybe open up the usefulness of actual jerk.

                      Reacting to that sudden change in direction due to shallow angles just seems archaic compared to looking ahead and realizing that you can preemptively accelerate that axis to make the change, within the allowed path deviation.

                      1 Reply Last reply Reply Quote 0
                      • CCS86undefined
                        CCS86
                        last edited by

                        So much good discussion here: https://forum.duet3d.com/topic/4802/6th-order-jerk-controlled-motion-planning?_=1585069930938

                        I'm not sure why that thread was locked.

                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator @CCS86
                          last edited by

                          @CCS86 said in S-Curve/ sinusoidal , Jerk +acceleration:

                          I'm not sure why that thread was locked.

                          I think it just aged out. I can unlock it.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          DocTruckerundefined 1 Reply Last reply Reply Quote 0
                          • DocTruckerundefined
                            DocTrucker @Phaedrux
                            last edited by DocTrucker

                            @Phaedrux said in S-Curve/ sinusoidal , Jerk +acceleration:

                            I think it just aged out. I can unlock it.

                            Why does that happen? Surely we should be encouraging users to search the forum for answers? If they find their issue is unresolved and they have more information to add why does it make sense default to fragmenting the conversation?

                            Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                            deckingmanundefined 1 Reply Last reply Reply Quote 0
                            • deckingmanundefined
                              deckingman @DocTrucker
                              last edited by

                              @DocTrucker in answer to your question about why old posts get locked, it's because Tony did a poll asking what user's thoughts on it were, and the concesus was yes, (
                              after 45 days IIRC). I'm not saying that's the right decision or otherwise - just explaining the process behind how it came about.

                              Ian
                              https://somei3deas.wordpress.com/
                              https://www.youtube.com/@deckingman

                              DocTruckerundefined 1 Reply Last reply Reply Quote 0
                              • DocTruckerundefined
                                DocTrucker @deckingman
                                last edited by

                                @deckingman thanks. Missed that completely. Odd decision but fair enough...

                                Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                                deckingmanundefined 1 Reply Last reply Reply Quote 0
                                • deckingmanundefined
                                  deckingman @DocTrucker
                                  last edited by

                                  @DocTrucker Yes I just found the poll - the result was a bit like Brexit - 53% for, 47% against. So not quite half are unhappy and slightly more than half are happy. ☺
                                  https://forum.duet3d.com/topic/7199/locking-old-posts-poll

                                  Ian
                                  https://somei3deas.wordpress.com/
                                  https://www.youtube.com/@deckingman

                                  1 Reply Last reply Reply Quote 0
                                  • dc42undefined
                                    dc42 administrators
                                    last edited by

                                    I think the main reason we wanted to do that was because when some users had a problem, they would resurrect an ancient thread that appeared to be related instead of starting a new thread.

                                    Duet WiFi hardware designer and firmware engineer
                                    Please do not ask me for Duet support via PM or email, use the forum
                                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                                    NitroFreakundefined 1 Reply Last reply Reply Quote 1
                                    • NitroFreakundefined
                                      NitroFreak @dc42
                                      last edited by

                                      @dc42 said in S-Curve/ sinusoidal , Jerk +acceleration:

                                      I think the main reason we wanted to do that was because when some users had a problem, they would resurrect an ancient thread that appeared to be related instead of starting a new thread.

                                      What is so wrong about that? The information posed in those threads is not wrong just because itΒ΄s old.
                                      It also makes it easier for future searches if tangent problems are all in a single thread rather than 50 separate ones.

                                      botundefined 1 Reply Last reply Reply Quote 0
                                      • botundefined
                                        bot @NitroFreak
                                        last edited by

                                        @NitroFreak the firmware was developing at a very rapid pace when that decision was made. Often, those ancient threads were no longer current. They had info which was outdated and applied in no way to current scenarios.

                                        Now, we face that same rate of change so locking threads may become prudent (when they have outdated info).

                                        *not actually a robot

                                        1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator
                                          last edited by

                                          Since that locking old threads decision we have also added a notice that shows the time elapsed since the last post to indicate more clearly when a thread has been resurrected.

                                          Sometimes it's useful to be able to add information to old threads, and sometimes it would be better to just start a new thread. If you want to you can still link to the locked thread.

                                          There's no solution that will solve everything and make everyone happy. It is what it is. If there is a thread you find that you want unlocked, message a moderator.

                                          Anyway, none of this conversation has anything to do with S curve acceleration.

                                          Z-Bot CoreXY Build | Thingiverse Profile

                                          1 Reply Last reply Reply Quote 1
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA