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.
    • makundefined
      mak
      last edited by

      correct me if im wrong- but the other thread asked for different acceleration values based on speed
      not a whole different acceleration profile to make for more efficient movement over-all and less ringing..
      is Ian discrediting lars's findings with less ringing artifacts and higher print speeds?

      Perhaps im just too stupid to understand? haha.

      i think this is a whole new topic?

      Ringing is caused (generally) by flex in the belt and oscillation thereafter.- the new acceleration profile not only myself but others theorize will reduce oscillation frequencies that trigger belts to act erratically therefore better surface finish.

      is this an incorrect assumption stemming from the video evidence presented?

      why would Trinamic invest R&D if its not a useful feature?
      why would Lars invest time and effort to implementing this also, Is his findings inaccurate?

      please educate me 🙂

      a quote from Lars's findings

      I'm currently up to about 550mm/s travel, 425mm/s infill printing (extruder permitting) and 100-150 mm/s perimeters (depending on quality & planner speed – and if sharp corners are needed -- extruder response limits crisp corners at high speed). Even at lower speeds, the s-curve profile gives better print quality -- for example, less oscillation / waves after hard corners .

      we can theories till the cows come home- but it seems from the evidence that Sin- wave acceleration profiling as the future of high quality fdm movement? once again i am open minded to be crushed - if you can give me evidence to prove its not effective please present it here.

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

        What the OP is arguing for is to make the second derivative of position (commonly called 'jerk' by mechanical engineers, although that term has a different meaning in 3D printing) continuous, instead of discontinuous as it is with trapezoidal velocity profiles.

        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.

        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

        Edgars Batnaundefined 1 Reply Last reply Reply Quote 4
        • makundefined
          mak
          last edited by

          non-poliginal vector STL files? in a perfect world 😛

          i mean surely it can be implemented without that 😕
          seems lars figured it out. maybe with some sort of approximation technique?

          im hoping he publicizes his documentation maybe you can take a look at it?

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

            I haven't yet seen any videos or other hard evidence that S-curve acceleration improves 3D printing - except for those in the habit of putting beer glasses on top of the hot end!

            From a theoretical perspective, S-curve acceleration should reduce the higher frequency components of the forces applied, and so would reduce the tendency to excite high frequency resonances.

            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

            Sphyloidundefined 1 Reply Last reply Reply Quote 0
            • makundefined
              mak
              last edited by

              The notion that the ripples and oscillation in the water would correlate to the ripples and oscillation in the belt is compelling.
              I hope Lars uploads his firmware and i will do some test prints and compare.
              Lars has claimed it reduces ringing not quite hard evidence i agree- perhaps not enough for you to invest time and effort- i respect that.
              thanks for considering it at the very least.
              I hope this is revisited. if only for the purpose of learning.

              1 Reply Last reply Reply Quote 0
              • oleeundefined
                olee
                last edited by

                @dc42: second derivative of position called acceleration not jerk IIRC. So the OP suggest make acceleration smooth. IMO it is worth of considiration not sure about implementation cost.

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

                  You are quite right of course, jerk is the third derivative of position. I started writing one thing and ended up writing another, without editing what I had already written.

                  I remain of the opinion that implementing smoothly-varying acceleration is of dubious value unless we first deal with the elephant in the room i.e. discontinuous commanded velocity changes, aka jerk in the 3D printing sense.

                  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
                  • botundefined
                    bot
                    last edited by

                    @mak:

                    non-poliginal vector STL files? in a perfect world 😛

                    i mean surely it can be implemented without that 😕
                    seems lars figured it out. maybe with some sort of approximation technique?

                    im hoping he publicizes his documentation maybe you can take a look at it?

                    STEP files.

                    *not actually a robot

                    1 Reply Last reply Reply Quote 0
                    • makundefined
                      mak
                      last edited by

                      does duet firmware not handle jerk as-well as marlin?

                      1 Reply Last reply Reply Quote 0
                      • WalterSKWundefined
                        WalterSKW
                        last edited by

                        @T3P3Tony:

                        don't get Ian started 😄

                        Thank you Tony for bringing this into (at least) my focus!
                        Very interesting thread!
                        I learned to not make things more complex then they need to be!

                        Brian once said: "Always look at the bright side of life"
                        Works for me!

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

                          @mak:

                          does duet firmware not handle jerk as-well as marlin?

                          Very old versions if RRF (about 2.5 years old) didn't handle jerk very well. I don't think Marlin handled jerk properly at that time either.

                          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
                          • makundefined
                            mak
                            last edited by

                            Alden Hart
                            4 years ago
                            Acceleration is performed using a piecewise linear representation of a constant-jerk equation. This is the 3rd derivative of position instead of the 2nd derivative (constant acceleration) that is commonly used. The pulse rate is computed for each of the S-curve segments. Each axis is run as a "minor axis" of the 50 Khz clock rate. This minimizes jitter and aliasing - at the expense of running a fast clock rate all the time. The code is on github under tinyg if you want to take a look.

                            perhaps look here.

                            Id donate for you to take a serious look at this but something about your intellect tells me you're good for money dc42 😛

                            source:

                            https://www.youtube.com/watch?v=Om0wTqFA-Dw

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

                              Yes I know there is code out there to do S-curve acceleration. What I am saying is that it's pointless using it in 3D printing unless we do something about the requirement to command instantaneous velocity changes in 3D printing, which is necessitated by the approximation of curves by straight line segments together with the need to avoid stop/start motion for each line segment.

                              Commanding instantaneous velocity changes is likely to be far worse than commanding instantaneous acceleration changes, because it's asking for infinite acceleration. I could implement S-curve acceleration, but unless you set maximum jerk to a very low value, you would still excite vibrations when printing curves. And if you did set jerk to zero, it would print the curves very slowly and jerkily.

                              S-curve acceleration may make more sense for CNC machines for two reasons. The G2 and G3 commands are more commonly used to print arcs, rather than approximating curves using line segments. Speeds are much lower, so jerk can be set very low, perhaps even to zero.

                              I'm not saying that I won't implement S-curve acceleration in the future, I am saying that it has limited value in the context of 3D printing. OK for printing straight lines, useless for printing curves. If it was easy to do it properly, I would probably have done it already. But doing it properly requires the solution of cubic equations to calculate the step pulse times (currently RRF solves quadratic equations to calculate them).

                              So I would rather focus on a solution to jerk first, probably by deliberately deviating the tool path from the commanded path a little. When that's sorted, I can look at S-curve acceleration.

                              It would be interesting to calculate the forces generated in a typical 3D print due to to jerk and step changes in acceleration, then take the Fourier transform and see what the various contributions are in the most important frequency bands.

                              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 3
                              • makundefined
                                mak
                                last edited by

                                I wonder if you can put an accelerometer onto tool head and input on the duet, to record the feedback,

                                you perhaps could use that data… and the real time data to create a PID tuning system to dampen out the oscillation real-time.. perfect printing. also you could use that accelerometer to judge if there have been skipped steps or nozzle crashes..
                                ?
                                ...imagine having that setup then somebody mounts their accelerometers off axis and the whole printer goes haywire correcting wrong values lol
                                alright Thanks for hearing me out Dc42- I hear you’re doing exciting things with duet. Keep up the good work- best wishes.
                                the struggles to get rid of belt wobble are real.

                                1 Reply Last reply Reply Quote 0
                                • Alex.crundefined
                                  Alex.cr
                                  last edited by

                                  So a few weeks late to the party but…

                                  @dc42:

                                  So I would rather focus on a solution to jerk first, probably by deliberately deviating the tool path from the commanded path a little. When that's sorted, I can look at S-curve acceleration.

                                  I think this is the best solution and could greatly help out. Machine tools that use Fanuc controllers have an option to use a technique called Smoothing/Nano smoothing that does exactly what you are proposing. Many modern day CAM packages approximate complex curves as straight lines, same as our slicers do with STL files. There are some high performance machine tools that can approach 3d printing speeds while machining. Fanuc's answer was to allow deviations in the tool path by using look-ahead and building a NURBS curve. It is even intelligent enough to automatically turn off when the movement vector exceeds a specified angle.

                                  https://www.fanucamerica.com/home/products-services/cnc/cnc-technology/high-precision-machining

                                  https://www.youtube.com/watch?v=oEvrCK3p9Hg

                                  Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

                                  1 Reply Last reply Reply Quote 0
                                  • BMMalundefined
                                    BMMal
                                    last edited by

                                    Both AMF and OBJ file formats support curve approximation in different ways. It seems that Microsoft's 3MF does too. Doesn't mean any common CAD software actually properly exports that feature of the file formats. I understand that there aren't any slicers which would properly handle this yet either.

                                    Looks like Cosine Additive has some G2/G3 stuff figured out. I know this is already implemented in Firmware. It's beyond my capabilities but maybe a post processor could bridge the gap between current slicer capabilities and what the firmware is capable of?
                                    https://www.cosineadditive.com/blog/2015/7/1/g2-g3-vector-based-printing

                                    Duet Ethernet - Most likely the most recent Edge firmware
                                    Duet X5
                                    7" Panel Due V2
                                    Cartesian, 4 Nozzles with Flex3Drives, Heated Chamber, Simple Switch Filament Sensing

                                    1 Reply Last reply Reply Quote 0
                                    • tjhintonundefined
                                      tjhinton
                                      last edited by

                                      Curve approximation as straight segments would really be fine if there was hardware accurate/precise enough to create artifacts in FDM prints just from the "error" of microstepping, right? Polyjet machines are amazing because they show stl roughness. We still don't have proper pressure regulation within hotends. Nor do we have common methods for modeling kinematics (which may follow with the dissemination of higher order movement planning in desktop printing platforms). Perhaps a feature like s-curve movements will drive better hardware. It should lift the acceleration/payload and velocity ceilings a bit. I'd like to know if s-curves even match to "advance" behavior in a standard hotend like a titan aero.

                                      1 Reply Last reply Reply Quote 0
                                      • r3cvrundefined
                                        r3cvr
                                        last edited by

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

                                        https://www.youtube.com/watch?v=qYJpl7SNoww

                                        Bottom is a square wave, not a trapezoid. You'd see 4 sploshing events if it were a trapezoid.

                                        1 Reply Last reply Reply Quote 0
                                        • ExtreMmeundefined
                                          ExtreMme
                                          last edited by ExtreMme

                                          I have ready 3D printing s-curve velocity profile. And continuing velocity to next move in tangential directiin. Support corner shape to move without stop to next directiin and start from 0. Now i rewrite code to custom moderboard with pic32mz 200mhz. On pic24hj128gp202 calculate next move is abow 4us. . Now i must write communication protokol to support g code. In this moment i have G0 G1 G2 G3 and G4. Hi this pass for testing.

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

                                            While I was on vacation I did a Fourier analysis of the effects of trapezoidal and S-curve acceleration on exciting ringing. My conclusion was that whether S-curve acceleration helps or not depends on the relationship between the time spent accelerating or decelerating and the frequency of the ringing that you are trying to avoid.

                                            Here is the summary. Let T be the time spent accelerating or decelerating, and let F be the frequency of ringing that you want to avoid.

                                            • If F << 1/T then constant acceleration and S-curve acceleration are equally bad.
                                            • Otherwise, if F < 1.3/T then constant acceleration is better than S-curve (triangular profile) acceleration. In particular, when F = 1/T then constant acceleration will hardly excite the ringing at all; whereas S-curve acceleration will excite it greatly.
                                            • When F > 1.3T, S-curve acceleration wins at most frequencies. The higher F is, the better S-curve acceleration is - although the tendency to excite ringing when using constant acceleration also falls with rising F.

                                            Here is a chart to compare how the two acceleration profiles excite ringing at different frequencies.

                                            79982091-6f93-4439-b131-4d0ae628a225-image.png

                                            Based on this analysis, I discussed how to adjust the acceleration time to reduce ringing in this thread https://forum.duet3d.com/topic/5951/periodicity-of-ringing/39 and received reports that it worked. Today I found time to do my own beer-sloshing tests (see the video I posted to that thread), and they too have confirmed the theory for constant acceleration (trapezoidal) motion.

                                            So before you decide that you must have S-curve acceleration, you really need to know the frequency of the ringing that you are trying to eliminate. If the ringing frequencies are high enough, then S-curve acceleration will help. But if they are low, then it will probably be better to use trapezoidal motion, and cancel out the lowest ringing frequency by choosing the acceleration carefully.

                                            I'll write up the maths in a blog post when I find time.

                                            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 7
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA