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

Acceleration as a function of speed

Scheduled Pinned Locked Moved
Firmware wishlist
5
43
6.5k
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.
  • undefined
    dc42 administrators
    last edited by 8 Aug 2017, 06:52

    That's an interesting idea, but difficult to implement. The existing code divides each move into up to 3 phases: an acceleration phase, a steady speed phase, and a deceleration phase. During the acceleration and deceleration phases, the timing of each step pulse is calculated by solving a quadratic equation. Your proposal would require up to 5 segments, and in the extra 2 phases I think it would be necessary to solve a cubic equation.

    An easier approach would be to choose the acceleration of the move as a whole depending on its top speed. That would allow maximum acceleration for printing moves and only reduce the acceleration for high speed travel moves.

    Have you done the calculation at https://duet3d.com/wiki/Choosing_stepper_motors#How_to_work_out_the_power_supply_voltage_you_need to work out the speed at which you no longer get full torque from the motors? Are you using 12V or 24V power?

    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
    • undefined
      deckingman
      last edited by 8 Aug 2017, 07:23

      You'd have to choose the acceleration for the entire move otherwise you'll be introducing jerk (in the physics sense - the rate of change of acceleration) which we definitely don't want.

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

      1 Reply Last reply Reply Quote 0
      • undefined
        olee
        last edited by 8 Aug 2017, 07:49

        I can see why could the acceleration depend on the speed. The acceleration depends on the force that is limitted by the stepper motor torque. Maybe the motor torque depends on its rpm tho.

        1 Reply Last reply Reply Quote 0
        • undefined
          vp
          last edited by 8 Aug 2017, 08:17 8 Aug 2017, 08:14

          @DC42:
          "anything" which comes closer to the real limitations of a stepper would be an improvement compared to now.

          Setting different acceleration values for printing and traveling is already possible. It would be new, that it depends also on top speed.

          I use 24 V because the Duet doesn´t allow more. From CNC i am used to > 36 V….
          I did my own calcs which are more or less the same. I can speed up with > 2g to about 1000 mm/s in theory and in real life. But until now i didn´t print anything because the printer is not finished and i am waiting for parts (z-axis is missing).

          If the acceleration would be a f(speed) i could increase the acceleration much more, especially for travel moves, because there "deformations of the belts/bars" (stiffness) is no problem. If the travel moves are damn fast, retraction and all the extrusion problems/imperfections (pressure advance and so on) becomes "negligible". So also flexible stuff on a bowden system works.
          For constant extrusion (== no problems) a constant speed is most important, therefore high acceleration on slow printing speed is also needed.

          BTW: So far i had no problems with max pulses from the Duet and M122 also shows no problems at high speeds. I am wondering how that works at 1000 mm/s 😉

          @deckingman:
          If you don´t vary it smoothly yes, but everybody uses jerk.... and it works, so the step has just to be not too big.
          The 3 phases of the move also introduce jerks at 2 times.

          1 Reply Last reply Reply Quote 0
          • undefined
            deckingman
            last edited by 8 Aug 2017, 08:25

            @vp:

            @DC42:

            @deckingman:
            If you don´t vary it smoothly yes, but everybody uses jerk…. and it works, so the step has just to be not too big.
            The 3 phases of the move also introduce jerks at 2 times.

            NO. That's completely wrong! Jerk as used by 3D printers is referred to as instantaneous speed change and is only applied when there is a change of direction, which usually only happens doing short segmented perimeter moves. Instantaneous speed changes are NEVER applied otherwise. ANY variation to the rate of change of acceleration will result in jerky motion as defined in the physics sense. You cannot alter the rate of change of acceleration and get smooth motion.

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

            1 Reply Last reply Reply Quote 0
            • undefined
              olee
              last edited by 8 Aug 2017, 09:08

              @deckingman
              ANY variation to the rate of change of acceleration will result in jerky motion as defined in the physics sense. You cannot alter the rate of change of acceleration and get smooth motion.

              If we are not in a quantum world ANY motion is SMOOTH in physical sense ( the space is smooth anyway). I can't understand why max acceleration should depend on the speed if limitting factor is the max available force (max torque). a=F/m in classical physics no matter how fast we are moving.

              1 Reply Last reply Reply Quote 0
              • undefined
                deckingman
                last edited by 8 Aug 2017, 11:00

                @zov:

                @deckingman
                ANY variation to the rate of change of acceleration will result in jerky motion as defined in the physics sense. You cannot alter the rate of change of acceleration and get smooth motion.

                If we are not in a quantum world ANY motion is SMOOTH in physical sense ( the space is smooth anyway). I can't understand why max acceleration should depend on the speed if limitting factor is the max available force (max torque). a=F/m in classical physics no matter how fast we are moving.

                The first derivative of position is velocity, the second derivative is acceleration, the third (rate of change of acceleration) is jerk, named because of how it manifests itself.

                I think the OP is referring to the fact that the stepper motor torque drops off with speed so the maximum available force is speed dependent and therefore the maximum acceleration rate could be altered. I guess it would be possible if one looked ahead at the move, calculated the maximum speed it was likely to attain, then set the acceleration rate for that move (but you'd need to maintain that acceleration for the duration of the move otherwise you'll get jerky motion). Repeat the process for every move. That's an awful lot of processing to do on top of everything else that needs to happen. It's a lot easier to choose steppers that will give the necessary torque at the highest speed one is likely to use.

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

                1 Reply Last reply Reply Quote 0
                • undefined
                  vp
                  last edited by 8 Aug 2017, 11:15

                  @deckingman:

                  NO. That's completely wrong! Jerk as used by 3D printers is referred to as instantaneous speed change and is only applied when there is a change of direction, which usually only happens doing short segmented perimeter moves. Instantaneous speed changes are NEVER applied otherwise. ANY variation to the rate of change of acceleration will result in jerky motion as defined in the physics sense. You cannot alter the rate of change of acceleration and get smooth motion.

                  It is correct that "jerk" is only applied when direction changes, especially because it has a lot to do with "backlash".
                  But as mentioned by ZOV, nothing which is driven by a stepper (stepper says everything) is not "smooth in a mathematically sense" (That means continuous derivatives).

                  Stepwise change of acceleration is also not possible. Therefore it never happens, as well as jerk never happens, because the mass and stiffness smooths the step. As long as you don´t lose a real step (not microsteps) it does not hurt anybody.

                  @ZOV:
                  The max force is a function of the torque. The torque start to drop of quite soon. If you use higher speeds, you have to limit your acceleration to the worst case torque - which is the small torque at higher speeds.

                  E.g. torque at 100 rpm is 0.5 Nm, at 200 rpm 0.2 Nm. If you want to use 200 rpm even only for a very short time, you have to limit the acceleration even at slow speeds to 0.2 Nm torque - although the stepper could deliver 0.5 Nm.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    vp
                    last edited by 8 Aug 2017, 11:26

                    @deckingman:

                    It's a lot easier to choose steppers that will give the necessary torque at the highest speed one is likely to use.

                    I am sorry, but exactly this is not possible. More doesn´t help more and smaller steppers have exactly the same problem, only at a different level, until they are just too small.

                    Of course it is clear to choose the proper steppers, the link above from DC42 shows how to. But after you have done this, you still loose plenty of torque == printing quality and or printing time.

                    The difference in CPU resources is there, but depending on how it is solved not significant by definition.
                    Nobody says everybody has to use it.

                    If the ramp parts of the 3 move phases are split in 2 parts, one part limiting the speed to speed_limit_1 (this is already done now) and the second part of the ramp is limited to speed_limit_2. For both parts 2 acceleration settings could be applied. I don´t believe that this is too CPU intensive. The change in acceleration does not matter at all in real life.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      olee
                      last edited by 8 Aug 2017, 11:49 8 Aug 2017, 11:30

                      @deckingman:
                      The first derivative of position is velocity, the second derivative is acceleration, the third (rate of change of acceleration) is jerk, named because of how it manifests itself.

                      I think the OP is referring to the fact that the stepper motor torque drops off with speed so the maximum available force is speed dependent and therefore the maximum acceleration rate could be altered.

                      For the sake of truth the smooth space is infinitely differentiable so any move is smooth by definition. I am not sure that stepper motor torque depends on speed of rotation very much but I may err, not fully my field of knoweledge.

                      Correction: I saw that MAX torque indeed depends on speed (Power = Torque x Angular Speed). I appologise for my misunderstanding.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dc42 administrators
                        last edited by 8 Aug 2017, 12:16

                        @vp:

                        E.g. torque at 100 rpm is 0.5 Nm, at 200 rpm 0.2 Nm. If you want to use 200 rpm even only for a very short time, you have to limit the acceleration even at slow speeds to 0.2 Nm torque - although the stepper could deliver 0.5 Nm.

                        That's not true, because we use constant current stepper drivers. Torque is proportional to current, so torque is maintained as RPM increases up to the point at which the back emf due to inductance + back emf due to rotation + voltage drop due to resistance exceed the driver supply voltage, and the driver can no longer supply enough voltage to achieve the desired peak current.

                        It would be true using constant-voltage drivers though.

                        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
                        • undefined
                          olee
                          last edited by 8 Aug 2017, 12:33

                          That's not true, because we use constant current stepper drivers.

                          Thanks David. It became crystal clear that variable acceleration is useless for our case.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            dc42 administrators
                            last edited by 8 Aug 2017, 12:44

                            @zov:

                            That's not true, because we use constant current stepper drivers.

                            Thanks David. It became crystal clear that variable acceleration is useless for our case.

                            I don't think it's completely useless. It would be useful if the combination of motor, drive voltage and drivechain gearing meant that it was not possible to maintain the specified motor current at high speeds. This could be the case for a printer that uses leadscrews for the X and Y axes, because of the high steps/mm of such an arrangement. But for belt-driven printers, I think it's usually possible to choose motors that don't run into the torque limit at the highest wanted RPM - especially when using a series 2 Duet with its 2.4A output capacity, because that allows you to to choose motors with lower inductance (and higher operating current) than when using the types of driver found in other 3D printer control electronics.

                            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
                            • undefined
                              fma
                              last edited by 8 Aug 2017, 13:38

                              @dc42:

                              That's not true, because we use constant current stepper drivers. Torque is proportional to current, so torque is maintained as RPM increases up to the point at which the back emf due to inductance + back emf due to rotation + voltage drop due to resistance exceed the driver supply voltage, and the driver can no longer supply enough voltage to achieve the desired peak current.

                              It would be true using constant-voltage drivers though.

                              Are you sure of that? I never saw a torque vs speed curve with a flat part, then a falling part; they always start to fall as soon as rpm>0 (more or less quickly, depending on the supply voltage, for the rasons you mentioned). And I never saw constant voltage drivers (except diy ones)…

                              Frédéric

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                deckingman
                                last edited by 8 Aug 2017, 14:05

                                @vp:

                                …....................The change in acceleration does not matter at all in real life.

                                Try it next time you are driving your car. Rather than accelerating evenly, pump the accelerator up and down. Or conversely slow down by pumping the brake peddle instead of applying gentle even pressure. The jerk you will encounter is the result of altering the rate of change of acceleration (and it does matter in real life as well as in 3d printing).

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

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  olee
                                  last edited by 8 Aug 2017, 14:08

                                  @fma:

                                  @dc42:

                                  That's not true, because we use constant current stepper drivers. Torque is proportional to current, so torque is maintained as RPM increases up to the point at which the back emf due to inductance + back emf due to rotation + voltage drop due to resistance exceed the driver supply voltage, and the driver can no longer supply enough voltage to achieve the desired peak current.

                                  It would be true using constant-voltage drivers though.

                                  Are you sure of that? I never saw a torque vs speed curve with a flat part, then a falling part; they always start to fall as soon as rpm>0 (more or less quickly, depending on the supply voltage, for the rasons you mentioned). And I never saw constant voltage drivers (except diy ones)…

                                  The curve you are talking about is for the case of constant driving voltage (nominal voltage applied to the DC motor). I think David is right as duet's drivers are constant current ones.

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators
                                    last edited by 8 Aug 2017, 16:57

                                    That's right, torque vs. speed curves are only relevant to constant voltage operation. If you wanted to publish a torque vs. speed curve for constant current operation, you would have to specify the actual RMS or peak used and the driver supply voltage, because both of those affect the point at which the torque starts to drop off.

                                    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
                                    • undefined
                                      fma
                                      last edited by 8 Aug 2017, 19:01

                                      At work, we use Nema 34 Slo-Syn steppers, and curves given by the manufacturer (sorry, I only have them on paper, and as I'm on holidays, I can't scan them) do specify driver supply voltage; I guess they give them for nominal current of the motor. And they usually show 2 or 3 curves, for different supply voltages (24V, 48V and 70V, if I remember correctly).

                                      As I have these documentations for more than 20 years, and as we always used constant current drivers, I assumed constant voltage drivers were abandoned long ago…

                                      Frédéric

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        vp
                                        last edited by 8 Sept 2017, 06:12 8 Aug 2017, 19:17

                                        Dear all,

                                        i know very well what constant current vs constant voltage means, i am a CNC guy and in the very old past there was only constant voltage with all limitations.
                                        Please do me a favour and just google –> https://www.google.at/search?q=stepper+torque+curve and check the pictures. I don´t understand why that is a secret here ?!?

                                        Because of back EMF as mentioned already several times the torque starts to drop at about 0-10 rps (revs per second, depending on supply voltage). The constant current ONLY applies in the low speed region, because afterwards (at higher speeds) the coil limits the current. The reason to use higher supply voltage is because of this effect. At 12V it starts at nearby 0 rps, at 24V before 5 and with high voltage (48 V and above) the constant current torque maybe gets to 10 rps.

                                        5 rps means with a 16 GT2 pulley 5162 = 160 mm/s !!!!! I don´t know why a 3D printer should not operate in higher speed regions? At 12 V torque drops from "zero speed".

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          vp
                                          last edited by 8 Aug 2017, 19:24

                                          please do me a favor and e.g. check the following link: http://www.electrocraft.com/products/stepper/TPP23/ and go to the tab "speed/torque curves", there is nothing more to say

                                          1 Reply Last reply Reply Quote 0
                                          11 out of 43
                                          • First post
                                            11/43
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA