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

    Acceleration algorithm for step pulse generator

    Scheduled Pinned Locked Moved
    Off Topic
    2
    2
    261
    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.
    • baird1faundefined
      baird1fa
      last edited by

      Hello all. I’m working on a step controller using an FPGA to generate the pulses. The issue I’m having is calculating acceleration. The software I’m using makes it easy to use clock cycles of the 40MHz for the timing of the pulse and the frequency of the pulses. I can generate consistent pulses. Where I am struggling is to make controlled movement where the acceleration is consistent over a given number of pulses then stay constant, followed by a controlled deceleration.

      If I need say 100 pulses to accelerate over say 0.5 seconds then that would be 2million clock cycles for acceleration. If I shorten the timing between pulses I don’t get smooth acceleration but rather slow acceleration with a sudden quick ramp at the end.

      I can’t seem to find anything on google so I thought I would reach out here as I can only assume someone on here has solved this before.

      Thanks.

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

        @baird1fa for smoothly accelerating or decelerating motion the time t of the nth step pulse measured from the start of the move is given by this formula:

        t = t0 +/- sqrt(q + p * n)

        where p = 2/a, q = t0^2

        where t0 = -u/a, a is the acceleration and u is the initial speed.

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