Calculating peak velocity

  • #1

Main Question or Discussion Point

I am trying to program some motion control devices which have trapezoidal motion profiles to define a move. I can define the slewing(peak) velocity, accel/decel rates and distance to travel, the the hardware moves a motor the appropriate distance with the parameters given.

I need to be able to define a specific amount of time that a move will last, and calculate what the peak velocity should be when all other factors are known. Starting velocity is not always zero, but ending velocity will always zero for my purposes. The move will always be trapezoidal.

I have an equation for defining the distance traveled when all other factors are known, but I need to isolate the peak velocity to one side of the equation and I am not sharp enough at this math to be able to solve for the peak velocity. Any help would be greatly appreciated.

Assuming:
d = total distance traveled
t = total time
AC = acceleration
DC = deceleration
Vi = initial velocity
Vs = slewing (peak) velocity
Vf = final velocity

I have this equation which I believe is correct. I need to isolate Vs to one side:

d = [(Vs+Vi)/2]*[(Vs-Vi)/AC] + [(Vs+Vf)/2]*[(Vf-Fs)/DC] + Vs*[t-((Vf-Vs)/DC)-((Vs-Vi)/AC)]

I was advised to put it in quadratic form and isolate the Vs but I have found that very difficult. Please help me solve this!

Thanks
 

Answers and Replies

  • #2
390
1
First here is a slightly cleaner way of presenting your equation
[tex]
d = \frac{Vs^2 - Vi^2}{2AC} + \frac{(Vs + Vf)(Vf - Fs)}{2DC} + Vs ( t - \frac{Vf - Vs}{DC} - \frac{Vs - Vi}{AC} )
[/tex]
 
  • #3
390
1
I then plugged this into Mathematica, the result seemed a bit hairy to type out here so I've attached it as an image.
20fue83.png
 
  • #4
Dear JHamm,

Thank you so much for doing that for me... although I screwed up an would ask you or someone else to plug this equation back in to Mathematica for me. I realized when trying to apply the equation you gave that I had included a typo in my original post. There is in fact no "Fs" variable, that was supposed to read "Vs". I have provided the corrected equation below. If you could re-run it for me as soon as possible I would greatly appreciate it.

Thanks much - Lars

corrected:

d = [(Vs+Vi)/2]*[(Vs-Vi)/AC] + [(Vs+Vf)/2]*[(Vf-Vs)/DC] + Vs*[t-((Vf-Vs)/DC)-((Vs-Vi)/AC)]

(sorry I tried to put it in to the MathJax format but I couldn't seem to get it to work...)
 
Last edited:
  • #5
390
1
Here is the new solution, hope it works out this time :)


In case you were interested PhysicsForums' servers run a Latex package which allows you to format mathematical expressions, there's a quick guide here - https://www.physicsforums.com/misc/howtolatex.pdf
 

Attachments

  • #6
Great! Thanks so much. I'll take a look at the guide.
 
  • #7
Could I trouble you once more? I would like to see (Vs) solved for using just a portion of the equation, leaving off the deceleration period (the middle portion of the first equation):

[tex]
d = \frac{Vs^2 - Vi^2}{2AC} + Vs ( t - \frac{Vf - Vs}{DC} - \frac{Vs - Vi}{AC} )
[/tex]

and then using only the acceleration portion:
[tex]
d = \frac{Vs^2 - Vi^2}{2AC}
[/tex]

Thanks.
 
  • #8
390
1
No problem :)
For the first one...
29w36ds.png


And for the second...
15pk8ye.png


:)
 
  • #9
Thanks! One more question :)

In the original equation you posted there is what I interpret as a Square Root symbol right about in the middle of the equation. I read this as if it extends to the end of the equation from there, based on the placement of parentheses.

In the new results you posted the square root symbols extend graphically over the portion of the equation that they are meant to cover. Is this just a quirk in the graphical output of Mathematica, or am I reading the first equation wrong?

Thanks
 
  • #10
390
1
I would take it as a quirk, it seems as though if the expression becomes too long it will just use parenthesis instead :)
 
  • #11
OK great, I will proceed accordingly. I have plugged the original equation in to the motion control software I'm using, and I immediately see a problem. If AC = DC then I get a division by zero error, because the first item in the equation [ 1/2(ac-dc) ] will always equal zero if AC(acceleration) is equal to DC(deceleration), which is often the case.

I will need to set up my code to check and see if AC=DC, and if it does I will need to use an alternate equation. Would you mind running the original equation one more time for me, except replace all the DC variables with AC. I think this will get me what I need and keep the division by zero error from occurring.

Thanks again!
 
  • #12
390
1
No problem mate :)

14mg04.png


Hope everything works out for you :)
 

Related Threads on Calculating peak velocity

  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
5
Views
6K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
1K
Replies
4
Views
3K
Replies
100
Views
5K
Replies
2
Views
3K
Top