Path: news.mathworks.com!not-for-mail
From: "Mark " <medwar19.nospam@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: trapezoidal triangular motion calcs
Date: Wed, 6 Feb 2008 01:29:02 +0000 (UTC)
Organization: Siemens Medical Solutions DX
Lines: 108
Message-ID: <fob2gu$c13$1@fred.mathworks.com>
References: <fnkquv$sge$1@fred.mathworks.com> <fnlaup$imv$1@fred.mathworks.com> <fntmc9$2ir$1@fred.mathworks.com> <fnu13k$5ur$1@canopus.cc.umanitoba.ca> <fnu1ue$6ul$1@canopus.cc.umanitoba.ca> <fnu80l$5vl$1@fred.mathworks.com> <fo35m9$d5p$1@fred.mathworks.com> <fo3e2e$gea$1@fred.mathworks.com>
Reply-To: "Mark " <medwar19.nospam@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202261342 12323 172.30.248.35 (6 Feb 2008 01:29:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 6 Feb 2008 01:29:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1037943
Xref: news.mathworks.com comp.soft-sys.matlab:449497


"Roger 
Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote 
in message <fo3e2e$gea$1@fred.mathworks.com>...
> "Mark " <medwar19.nospam@hotmail.com> wrote in message 
<fo35m9$d5p
> $1@fred.mathworks.com>...
> > Hello,
> > 
> > Thanks for your time and method of dealing with 
> > acceleration. I'm interested in writing a script that 
will 
> > allow me to put any path and calculate a bunch of 
motion 
> > parameters including the minimum velocity, accleration 
and 
> > jerk that can be used to get round the path in a 
specific 
> > time.
> > 
> > This is a common robotics problem that has proven 
harder to 
> > solve that I expected.
> > 
> > Once again, I appreciate your time and insight.
> > 
> > Regards,
> > 
> > Mark.
> -----------
>   For any pair of successive points in your path, I am 
assuming you have three 
> given quantities in advance: 1) D, the distance between 
the points, 2) T, the 
> allowed time for making the trip, and 3) A, the maximum 
permissible 
> acceleration and deceleration to be used along the way.  
As I have previously 
> indicated, the least possible maximum velocity is 
achieved by first 
> accelerating at the maximum amount, A, for some as yet 
unknown time t and 
> reaching maximum velocity v, then coasting at that 
constant velocity for time 
> T-2*t, and finally decelerating at maximum -A for time t 
so as to come to a 
> stop, with t being chosen so as to have traveled a total 
of D distance.
> 
>   Expressing this as an equation with t as the unknown, 
we get
> 
>  D = 1/2*A*t^2 + A*t*(T-2*t) + 1/2*A*t^2 = A*t*(T-t)
> 
>  A*t^2 - A*T*t + D = 0
> 
>  t = (A*T-sqrt(A^2*T^2-4*A*D)/(2*A) = T/2 - sqrt((T/2)^2-
D/A)
> 
> With a plus sign in front of the square root, t would 
exceed T/2 which is 
> impossible, so we have rejected that solution to the 
above quadratic.  If (T/2)
> ^2-D/A is negative, A is too small to allow a real 
solution and you have an 
> impossible problem.  Otherwise, the maximum velocity 
would be
> 
>  v = A*t = D / (T/2 + sqrt((T/2)^2-D/A))
> 
> where we have multiplied numerator and denominator by
> 
>  T/2 + sqrt((T/2)^2-D/A)
> 
> to rationalize the numberator.  Notice that if the 
permissible A is very large, 
> then v approaches D/T and t approaches 0.  If A is at the 
minimum possible 
> value with (T/2)^2-D/A = 0, then v = 2*D/T and t = T/2 
which gives the 
> triangular velocity profile.
> 
>   When I originally described this problem, I asserted 
that it would lead to a 
> linear equation, which as you see was incorrect.
> 
>   This may not fully answer the question you posed above, 
but I will confine 
> my contribution to what I have written here.
> 
> Roger Stafford
> 

Hi Roger,

Thanks for showing your workings. I started this way 
expressing the velocity and displacment equations for each 
move that I was interested in acheiving. My next step was 
to incorporate 2D and 3D moves rectilinear moves. The final 
stage was in use splines to smooth the robot passage around 
the transitions between the linear motions.

It turns out that National Instruments beat me to my goal 
with NI Motion Assistant but at least I understand the 
principles now.

Best regards,

Mark.