0
$\begingroup$

I'm developing a toolpath simulator for a milling machine. The tool can move around a circular path at a constant speed value (called feedrate, norm of the speed vector). The tool arrives stopped on the circle, has to accelerate along the path, get to speed, maintain speed and brake to a standstill without departing from the cicular path and in a pre-determined angular distance. I use a trapezoidal speed, that means I cut the path in 3 phases: getting to speed with contant acceleration, constant speed then braking with constant deceleration to a stop. For now I'm only considering that acceleration, target speed, radius and arc length are in the right conditions to achieve that 3 parts motions.

The problem with circular motion is the radial acceleration, simply turning at constant "speed" involves an acceleration towards the center. In the case of a variable speed tool with a maximum acceleration admissible, we have to "discount" the radial acceleration from the motion acceleration to avoid exceeding the machine limits. I'm only considering the first phase where we get from zero to target speed.

My exact "open" question is: given the total arc length in radians, the radius, the target feedrate, the maximal admissible acceleration, assuming the arc is long enough to do all 3 phases as described above, I want to create a function that takes an angle in input (a fraction of the arc) and outputs the time at wich the tool will be there if it follows the above-described movement law.

So here is my thinking, I'll split acceleration in radial part $a_r$ and tangent part $a_t$: $$a = \sqrt{a_r^2+a_t^2}$$ we are on a circle so: $$a_r = \frac{v^2}R$$ we start at speed zero, and we can integrate the acceleration to get the speed: $$v = a.t$$ $$a_r = \frac{a^2.t^2}R$$ we get: $$a = \sqrt{\left(\frac{a^2.t^2}R\right)^2+a_t^2}$$ $a$ is the max acceleration, let's deduce $a_t$ the maximal "usable" acceleration from it: $$a_t=\frac{\sqrt{a^2(R^2-a^2t^4)}}R$$

and that's my problem, when I integrate that to compute the speed, it gets out of hand: http://www.wolframalpha.com/input/?i=Integrate%5BSqrt%5Ba%5E2+%28R%5E2+-+a%5E2+t%5E4%29%5D%2FR%2C+t%5D

$\endgroup$
  • $\begingroup$ Is there a way to assume $R^2 \gt a^2t^4$ to get rid of the imaginary values? $\endgroup$ – Amzoti Apr 5 '13 at 2:13
  • $\begingroup$ I think so, it places a constraint on the speed, wich seems coherent because a too big speed wrt radius induces a too big radial acceleration wich would be forbidden by the machine. I generally ignore every negative or imaginary solutions, and check if I'm inside the physical limits beforehand. $\endgroup$ – nraynaud Apr 5 '13 at 2:50
  • $\begingroup$ That should help simplify the expression. Mathematica allows you to define assumption. WA gave a result for positive values at the end of the link you gave - so you might be able to use this to simplify it even further (I agree that imaginary values do not fit your model). $\endgroup$ – Amzoti Apr 5 '13 at 2:52
  • $\begingroup$ to tell you the truth, I'm totally out of my league with WA's result, I've never heard of elliptic integral. $\endgroup$ – nraynaud Apr 5 '13 at 3:02
2
$\begingroup$

There is a slight mistake in your analysis towards the beginning. You assumed that the speed is equal to the total acceleration time the time. However the radial acceleration has no effect on the magnitude of the velocity in circular motion.

Therefore we can write,

$$ v(t) = a_t t $$

Now lets assume your target velocity is $v_{max}$ then we know ahead of time that the maximum radial acceleration will be,

$$ a_{r_{max}} = \frac{v_{max}^2}{R}$$

Since we also know the maximum total acceleration, $a_{max}$ we can easily compute the maximum allowed tangential acceleration.

$$(a_{max})^2 = (a_r)^2 + (a_t)^2$$ $$a_t = \sqrt{(a_{max})^2-(a_{r_{max}})^2}$$ $$a_t = \sqrt{(a_{max})^2-\left(\frac{V_{max}^2}{R}\right)^2}$$

We know that the quantity inside the square root is strictly positive because the radial acceleration never exceeds the total acceleration.

The speed on the first leg of the process is then,

$$ v_I(t) = a_t t ; t \leq V_{max}/a_t $$

The angular distance for this step is given by

$$ \Theta_I = \int_0^{V_{max}/a_t} v_I(t)/R dt = \frac{V_{max}^2}{2Ra_t} $$

The angular distance on the third step of the process should be the same since the time for decelleration and the average speed will remain the same.

$$ \Theta_{III} = \Theta_{I} = \frac{V_{max}^2}{2Ra_t} $$

On the second leg of the journey we travel at a constant speed. The amount of time this takes depends on how much of the arc is left. Let $\Delta \Theta$ be the total angle traveled then we have,

$$\Delta \Theta = \Theta_I + \Theta_{II} + \Theta_{III}$$

$$\Theta_{II} = \Delta \Theta - (\Theta_I + \Theta_{III})$$

$$\Theta_{II} = \Delta \Theta -\frac{V_{max}^2}{Ra_t}$$

The time to traverse this arc is then,

$$ \Delta T_{II} = \frac{\Theta_{II} R}{ V_{max}}$$

Thet total time is then the time elapsed for each of the three journeys,

$$ T_{total} = \left( \frac{V_{max}}{a_t}\right) + \left( \frac{\Theta_{II} R}{ V_{max}}\right) + \left( \frac{V_{max}}{a_t} \right)$$

$$T_{total} = \left( \frac{2V_{max}}{a_t}\right) + \left( \frac{\Theta_{II} R}{ V_{max}}\right) $$

Everything on the right side of this equation is known so all that is left is some simple substitutions. This is all assuming that the tangential acceleration is constant, if you are able to vary the tangential acceleration then a more general solution using elliptic integrals is possible.

$\endgroup$
  • $\begingroup$ Thanks for your time, I'm digesting your answer. I think you made a small error in the substitution of $a_{r_{max}}$ (where $v_{max}$ should be squared), I'm trying to look if it propagates an error downstream. $\endgroup$ – nraynaud Apr 5 '13 at 4:05
  • $\begingroup$ I think I understand the difference in approaches, there is leeway in the interpretation of "trapezoidal speed". I tried to keep the global acceleration magnitude at its max all the time during the speed increasing phase, while you maximise it only at full speed and use a constant angular acceleration to get there (there would be reserve for pushing more because the tangential is not at it's max either). I like the idea of a more manageable computation, I'm not in rocket science. Thanks, I'll implement that system and check if the numbers look realistic. $\endgroup$ – nraynaud Apr 5 '13 at 4:20
  • $\begingroup$ No problem, it was my pleasure. You're absolutely right about the error I'll edit my submission to fix that. I don't think it will propagate further in the problem because I explicitly avoided substituting that nasty expression for $a_t$ later on. $\endgroup$ – Spencer Apr 5 '13 at 4:21
  • $\begingroup$ here is the result of your work: nraynaud.github.io/webgcode/… thanks. $\endgroup$ – nraynaud Apr 8 '13 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.