Hi forum,
I've been trying to calculate "inner-step delays" of a stepper motor with a equation, but I'm a bit stuck.
Background:
The objective is to step a motor nth times for a specified time. To further complicate things, I’ve been trying to factor in ramp time to achieve the desired target time.
Using an exponential equation to calculate the nth delay time, seemed to work pretty well. Changing the delay time linearly seemed to ramp the motor exponential? which was awful....
what I have is far is as follows.
iv = initial Velocity (given)
fv = final Velocity (?)
dt = total distance (given)
t = total time (given)
p = percentage IE 10%
t1 = s
t = 2*t1 + t2
t2 = d2/fv
d3 = d1 =dt * p
d2 = dt - 2*d1
dt = d1+d2+d3
n = nth step
y=ab^x ( {0, 1/5000} {d1, 1/fv} )
a = 1/iv
b = (iv / fv)^(1/n)
y = (1/iv)*(iv/fv)^(1/n)
so that's my exponential equation for calculating ramp delay time based on the nth step.
This actually gives y = 1/f. My microsecond delay is y/2.
To calculate the ramp time I’ve used a summation equation.
s = a*((1-b^n) / 1-b)
this gives the total time ramping will take at nth steps
The problem is I need compute the final velocity to account for the added ramp delay so I can finish steeping at the specified time. (I need to move a given distance in a given time)
I'm unable to solve to "fv", I feel like I'm missing something really obvious, and its really bothering me. I thought I would ask the forum to see if anyone had any ideas.
--------------------
a = 1/iv
b = (iv/fv)^(1/n)
s = a*((1-b^n)/(1-b))
t = d2/fv + 2*s
-----------------------
This is the sample datasets I’ve been working with.
dt = 9744
d1 = 974
d2 = 8770
iv = 5000hz
fv = ? (should be more than 9800hz)
n = 974
t = 1sec
Let me know if I need to provide more information, or explain things in more detail.
I'm looking forward to a reply, thanks.
I've been trying to calculate "inner-step delays" of a stepper motor with a equation, but I'm a bit stuck.
Background:
The objective is to step a motor nth times for a specified time. To further complicate things, I’ve been trying to factor in ramp time to achieve the desired target time.
Using an exponential equation to calculate the nth delay time, seemed to work pretty well. Changing the delay time linearly seemed to ramp the motor exponential? which was awful....
what I have is far is as follows.
iv = initial Velocity (given)
fv = final Velocity (?)
dt = total distance (given)
t = total time (given)
p = percentage IE 10%
t1 = s
t = 2*t1 + t2
t2 = d2/fv
d3 = d1 =dt * p
d2 = dt - 2*d1
dt = d1+d2+d3
n = nth step
y=ab^x ( {0, 1/5000} {d1, 1/fv} )
a = 1/iv
b = (iv / fv)^(1/n)
y = (1/iv)*(iv/fv)^(1/n)
so that's my exponential equation for calculating ramp delay time based on the nth step.
This actually gives y = 1/f. My microsecond delay is y/2.
To calculate the ramp time I’ve used a summation equation.
s = a*((1-b^n) / 1-b)
this gives the total time ramping will take at nth steps
The problem is I need compute the final velocity to account for the added ramp delay so I can finish steeping at the specified time. (I need to move a given distance in a given time)
I'm unable to solve to "fv", I feel like I'm missing something really obvious, and its really bothering me. I thought I would ask the forum to see if anyone had any ideas.
--------------------
a = 1/iv
b = (iv/fv)^(1/n)
s = a*((1-b^n)/(1-b))
t = d2/fv + 2*s
-----------------------
This is the sample datasets I’ve been working with.
dt = 9744
d1 = 974
d2 = 8770
iv = 5000hz
fv = ? (should be more than 9800hz)
n = 974
t = 1sec
Let me know if I need to provide more information, or explain things in more detail.
I'm looking forward to a reply, thanks.