Author Topic: [Math] CNC tool path generation from point A to point B  (Read 1881 times)

0 Members and 1 Guest are viewing this topic.

Offline blueskullTopic starter

  • Supporter
  • ****
  • !
  • Posts: 367
  • Country: cn
  • BA7LKP
[Math] CNC tool path generation from point A to point B
« on: February 04, 2021, 05:19:33 am »
As the title suggests, what is a good tool path generation algorithm for moving from point A at PA(x, y) with velocity VA(x, y) to point B at PB(x, y) with velocity VB(x, y)?

Naively, one may think just find the acceleration A(x, y) so that by the time the object reaches PB(x, y), the velocity reaches VB(x, y).

However, this does not work all the time, as in the real world the system has a maximum motor winding current, thus a maximum force, thus a maximum acceleration, so the acceleration must be capped at Amax.

Furthermore, for power supply stability reasons, I would prefer the acceleration to be kept constant at +-Amax or zero, so for each axis, only 3 possible acceleration values can be used, +Amax, 0 or -Amax.

Given the constraints, what is a good strategy for this problem?

I do have a naive solution that I will post later, but I'd like to know if there are other solutions.




Regards,

B.G.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2758
  • Country: us
Re: [Math] CNC tool path generation from point A to point B
« Reply #1 on: February 18, 2021, 03:56:13 am »
You have a trajectory generator that puts out a series of points from the beginning to the end of the move, calculating the number of intermediate points needed to get the desired velocity.

Then, you have a PID calculation that compares actual position to commanded, and figures out what to do with the motor to minimize following error.

Have a look at LinuxCNC, this has all been worked out 25 years ago.

Jon
 

Offline KrudyZ

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: us
Re: [Math] CNC tool path generation from point A to point B
« Reply #2 on: February 18, 2021, 04:41:32 am »
Limiting yourself to +- Amax or zero acceleration is generally a bad idea.
The transitions release energy that is stored in the flex of the moving parts which will then ring.
If you want more information on this, look up "jerk". It's the third time derivative of position, after velocity and acceleration.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf