CNC acc/dec look ahead algorithm

  • Thread starter Thread starter lionliam96
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary
SUMMARY

The discussion centers on implementing an acceleration/deceleration look ahead algorithm in a CNC controller using C#/F#. The key focus is on understanding the role of the sample period (Ts) in relation to interpolation periods (T) and how it affects the algorithm's performance. The white paper referenced provides foundational equations, but lacks clarity on Ts's definition, leading to confusion about its application in determining the duration of interpolation periods. Participants are encouraged to analyze the equations provided to derive a clearer understanding of Ts's function in the algorithm.

PREREQUISITES
  • Understanding of CNC control systems
  • F# programming language proficiency
  • Knowledge of acceleration and deceleration algorithms
  • Familiarity with mathematical modeling in control systems
NEXT STEPS
  • Review the white paper on Look-Ahead Algorithm with Whole S-Curve Acceleration and Deceleration
  • Study the implementation of sample periods in CNC algorithms
  • Explore mathematical modeling techniques for CNC motion control
  • Investigate the effects of jerk on acceleration/deceleration profiles
USEFUL FOR

CNC programmers, control system engineers, and anyone involved in optimizing motion control algorithms in CNC applications.

lionliam96
Messages
1
Reaction score
0

Homework Statement


I`m having some trouble with an acceleration/deceleration look ahead algorithm I`m trying to implement in a CNC controller written in C#/F#, specifically the algorithms treatment of time.

Homework Equations


The white paper can be found at:
https://www.researchgate.net/publication/258401146_Look-Ahead_Algorithm_with_Whole_S-Curve_Acceleration_and_Deceleration
Page 2 describes T as the interpolation periods and Ts as the sample period. T1, T5, max acc/dec and max jerk are prespecified so I`m guessing I`m supposed to figure out the duration of the other interpolation periods. If that`s the case, than what does Ts represent exactly?? Duration of the interpolation periods? Duration of the acc/const/dec regions? The paper doesn`t say...

The Attempt at a Solution


I`ve written out all the equations in f#, I just have no idea what Ts is supposed to be?

Code:
// Number of interpolation periods in acceleration region (Na):
let calcNa (Vs : double, Vm : double, Ts : double) : double =
Math.Round(Math.Sqrt(Vm - Vs / (1.0 + K) * J1 * Math.Exp(Ts)) + 1.0)

Thanks,
Liam
 
Last edited by a moderator:
Physics news on Phys.org
lionliam96 said:
Ts as the sample period
"Sample period" is the length of time you're sampling?