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

    S-Curve/ sinusoidal , Jerk +acceleration

    Scheduled Pinned Locked Moved
    Firmware wishlist
    30
    83
    20.3k
    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.
    • Hardware_SortingRoboticsundefined
      Hardware_SortingRobotics
      last edited by

      When S-curve acceleration is applied will the curve look more like this picture instead of a trapezoid? I got the picture off of the prusa calculator website.

      0_1542540074576_9d18e8cf-2705-4341-83f0-39c9d6a1850b-image.png

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

        That picture doesn't illustrate S-curve acceleration.

        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
        • stewwyundefined
          stewwy
          last edited by

          Is this what is trying to be achieved?

          alt text

          If so, do we also need to think about the timing ? As it effectively moves the area under graph in a positive way which is going to lead to an overrun. or am I over-thinking this?

          Apologies if this has already been discussed, I didn't notice it on a quick re-read of the thread.

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

            The problem with changing the profile like that is that it makes the total acceleration and deceleration times longer, which slows the print down. You could keep the trapezoidal profile but reduce acceleration and deceleration to lengthen the acceleration and deceleration phases instead, and that too would typically reduce ringing.

            To get an accurate comparison, you need to use a higher peak acceleration in the S-curve profile than you do in the trapezoidal profile, so that the total acceleration time is the the same in both cases. Similarly for deceleration.

            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

            stewwyundefined 1 Reply Last reply Reply Quote 0
            • markdashaboutundefined
              markdashabout @mak
              last edited by

              Did you say higher pint speeds?

              1 Reply Last reply Reply Quote 0
              • stewwyundefined
                stewwy @dc42
                last edited by

                @dc42 makes sense, heading towards the classic bell shaped curve, if you had unlimited speed and limited acceleration that is where you would want to be anyway.

                1 Reply Last reply Reply Quote 0
                • JoergS5undefined
                  JoergS5
                  last edited by

                  just for info: I saw the TMC5161 uses S-Shaped motion. I'll test whether it reduces vibrations at the extruder.

                  1 Reply Last reply Reply Quote 0
                  • Neonodeundefined
                    Neonode
                    last edited by Neonode

                    I am using printer with ball screws and I can say that for me S-curve is really important. While belt motion got some elasticity ball screw got 0. This is really cool as I have no ringing at all and really smooth print but I need to live with very low Jerk and acceleration settings like 200 Jerk and 300 acceleration. If I got faster the ball screws start producing noise like hammering during direction change. Current jerk implementation is just stupid. It is okay to change the speed with jerk but it is not okay to change the direction with half of the jerk speed. So I am really waiting for S-curve to come as it really will make my system to perform really well and to be silent.

                    Catalin_ROundefined Urbanundefined 2 Replies Last reply Reply Quote 0
                    • Catalin_ROundefined
                      Catalin_RO @Neonode
                      last edited by

                      @neonode What size of ball screws are you using (length, diameter and pitch) and what size of stepper (NEMA* and the torque)?

                      1 Reply Last reply Reply Quote 0
                      • Edgars Batnaundefined
                        Edgars Batna @dc42
                        last edited by

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

                        Unfortunately, in 3D printing we have a much worse problem, which is that curves are approximated by straight lines. This unfortunately forces us into making the first derivative of position discontinuous, to avoid dropping the speed to zero at every boundary between line segments in a curve. As long as we are forced to do this, there is very little point in worrying about the discontinuity of the second derivative.

                        If we ever reach the situation where the model files we slice represent curves properly, and the slicers that generate gcode from them generate Bezier curves, cubic splines or some other representation of curves, then implementing smooth changes in acceleration may be worth looking into.

                        Yes, but that would also mean whole new generation of modelling tools, gcode, slicers - generally the whole toolset. Can't we have a feature which approximates segmented movement using curves? Supporting curves way down the pipeline in the firmware is a thing that can be reused once the slicers are up to par.

                        The thing about curves is that nothing is a 100% curve. The 3d models are meshes or a mix of corners and curves that would otherwise need to be approximated somewhere, be it in firmware (if hardware permits) or PC application software as a pre-processing step.

                        1 Reply Last reply Reply Quote 0
                        • Urbanundefined
                          Urban @Neonode
                          last edited by

                          @neonode I agree!! The line segment jumps can be handled with filtering in the servo driver even if that is not a perfect solution.

                          1 Reply Last reply Reply Quote 0
                          • gnydickundefined
                            gnydick
                            last edited by gnydick

                            I agree with trying out s-curve. My printer is turning out great, and I want higher speed printing. 0_1545295414243_IMG_20181220_004320.jpg

                            These ripples are more visible than they are palpable, but the corner ringing is detectable to the touch.

                            https://dyzedesign.com/2016/10/printing-300-mm-s-part-1-basics-hardware/

                            https://www.controleng.ca/servosoft/SSHelp1033/source/MotionProfile.htm

                            I'm making another post with the photo with a different topic, keep an eye out 😉

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

                              Have you looked at the dynamic acceleration control feature in RRF 2.02RC6? It may help you to control the ringing. See https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M593_Configure_Dynamic_Acceleration_Adjustment.

                              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

                              gnydickundefined Edgars Batnaundefined 2 Replies Last reply Reply Quote 0
                              • gnydickundefined
                                gnydick @dc42
                                last edited by

                                @dc42 worth a try. Still would like s-curve. I'm not too worried about being slightly slower, my printer is printing cleanly at 150mm/sec, probably could go faster if I had a more powerful system of drivers and motors.

                                1 Reply Last reply Reply Quote 0
                                • Twigzundefined
                                  Twigz
                                  last edited by

                                  Good morning

                                  I've run into a problem that may or may not need a s curve.

                                  I'm driving the x and y gantry with a brushless/ encoder + lead screw setup and am able to get speeds up to 1mtr/s.

                                  The whole hotend assembly is rather hefty at 0.5 kg. At quick direction changes (corners of Infill at 45 degrees in a cube) it shakes uncomfortably much and I have to reduce to 500mm/s^2. At this acceleration it would take 1.5 seconds and approximately 500mm to get to its maximum speed.

                                  I did some tests and when printing a corner in a radius of 75mm an acceleration of 10.000mm/S^2 even seems reasonable
                                  My thought would be that the slower ramping up is what is causing this improvement. (as the direction turns from x to y the y gantry has to move exponentially faster)

                                  At 10.000mm/s^2 it only takes 0.07 second and 25mm to get to its maximum.
                                  If we interpolate between the two that gives 0.75 seconds and 262mm to obtain maximum speed. (in reality this would only be 25% quicker) this could decrease the overall print time on long complicated prints by quite a lot.

                                  I think printers with either a high capability of speed or a heavy hotend assembly will greatly benefit from a ramping acceleration/deceleration.

                                  I don't know if this is easier to setup than a s curve but perhaps it would be an idea to multiply the acceleration by time and by a factor in time to reach the max acceleration.
                                  In this case we could ramp up to 10.000mm/s^2 in 1 second and it would look like this:

                                  Acceleration = (acceleration*((t/factor) ^2))

                                  After 0.1 seconds:
                                  Acceleration= (10.000*((0.1/1) ^2)=100mm/s^2

                                  After 0.5 seconds:
                                  Acceleration=(10.000*((0.5/1) ^2)=2500mm/s^2

                                  After 0.75 seconds:
                                  Acceleration=(10.000*((0.75/1) ^2)=5625mm/s^2

                                  After 1.0 seconds:
                                  Acceleration=(10.000*((1.0/1) ^2)=10.000mm/s^2

                                  Ramping up to 5000mm/s2 in 3 seconds:

                                  After 1 seconds:
                                  Acceleration= (5000*((1/3) ^2)=555mm/s^2

                                  After 2 seconds:
                                  Acceleration=(5000*((2/3) ^2)=2222mm/s^2

                                  After 2.5 seconds:
                                  Acceleration =(5000*((2.5/3)^2)=3472mm/s^2

                                  After 3 seconds:
                                  Acceleration=(5000*((3/3) ^2)=5000mm/s^2

                                  Applying the same formula to the extruder would also ramp the extruder to not create under or over extrution during the ramping up.

                                  I've never heard of issues caused by the jerk between acceleration and max speed so this may or may not be a problem.

                                  Keeping acceleration and deceleration seperate would lead to even more tuneability as acceleration tends to be able to be a little bit higher.

                                  Jeff

                                  1 Reply Last reply Reply Quote 0
                                  • Twigzundefined
                                    Twigz
                                    last edited by Twigz

                                    After some more calculations and thinking i figured the reverse might be beneficial as a replacement for jerk. To stop extreme shaking and ringing the best would be to get to a full stop before changing direction.
                                    In this case reversing the above formula to jerk=jerk*(SQRT(T/Factor)) would start from a stop with a high acceleration where the acceleration increases exponentionally less.

                                    You could then finetune the jerk for sharp corners and direction changes after which you can tune the acceleration to the max your printer is capable off.

                                    I made some Ghraps to show what i mean in the hopes of it making things more clear in my explanation.

                                    0_1545699657408_graphs.png

                                    EDIT: When the jerk speed has been reached it would continue using acceleration instead.

                                    jeff

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

                                      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.

                                      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

                                      CCS86undefined 1 Reply Last reply Reply Quote 0
                                      • Edgars Batnaundefined
                                        Edgars Batna @dc42
                                        last edited by Edgars Batna

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

                                        Have you looked at the dynamic acceleration control feature in RRF 2.02RC6? It may help you to control the ringing. See https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M593_Configure_Dynamic_Acceleration_Adjustment.

                                        I'm using it and I can see an improvement in ringing on some corners. Overall ringing is less, but it is predictably now more inconsistent over multiple layers. Also, it depends on a well calibrated single ringing frequency, but here I've got X, Y ringing to actually take into account. On CoreXY ringing is different for both axes, plus things like tool changing means we need to sort of recalibrate each time. I assume E and Z are not directly affected, but I think they do need to have their own ringing controls.

                                        1 Reply Last reply Reply Quote 0
                                        • Sphyloidundefined
                                          Sphyloid @dc42
                                          last edited by Sphyloid

                                          @dc42 I know this is an old topic but your post here is 100% wrong, it is not entirely about ringing. It is instead about how stepper motors work. As you get higher RPM the motor loses torque exponentially. With a proper S curve and a rigid machine it may be possible to cut print time in half without losing steps or quality as you can use every bit of available torque at any given RPM with no fear of step-loss. Gone is the need for max speeds and conservative accelerations as you are only limited by the motor. Instead of the motor at the highest RPM in your desired speed range. There is no fear of going "too fast", setting a max speed is not necessary beyond a software limitation to catch errors in calculation.

                                          Personally I am searching for a feature that dynamically allows the user to define their own curve biased on the torque curve of the steppers. Marlin has already done this, it is not impossible. Though I do not believe they allow this to be user customizable.

                                          Not sure how this slipped past you guys.

                                          deckingmanundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                          • deckingmanundefined
                                            deckingman @Sphyloid
                                            last edited by

                                            @Sphyloid Whilst I accept what you say may be true as a general statement, it only applies to situations where motor torque is a limiting factor, and with the light weight tool heads that 3D printers use, achieving the desired torque is easily done by selecting an appropriate motor. For 3D printers the overal print speed is limited by how fast you can melt and extrude filament, not by how fast you can move the hot end in X or Y directions. So I have to disagree that any form of fancy acceleration control is going to reduce print time at all, let alone cut it in half.

                                            Whilst I accept that there may be some benefit in using S curve acceleration with CNC tool heads that have mechanical cutters, I fail to see how one could coax the filament being forced through a tiny hole to faithfully follow an S curve acceleration profile in the same way that the hot end carriage might. Smooth linear acceleration of molten filament is difficult enough to achieve, due to the severe damping effects and time lags involved with melting filament and forcing that viscous fluid through a tiny hole.

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

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