LinuxCNC S-Curve Accelerations

More
5 years 4 months ago #211919 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations

automata wrote: Hi arvidb,
Nice work with the jerk limited motion.
I am very much interested in helping out and have decent experience in the linuxcnc codebase.

Thanks!

Did you download and compile/run the code that I've already published ? If not, that's a good place to start (for anyone who wants to help).

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211921 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
Another step forward: I managed to implement that missing corner case yesterday. Here's an oscilloscope plot showing MPG jogging, where jerk limited planning might have its biggest impact:

A bit more interesting than the last plot, don't you think? :)

There are still a few known bugs in the code, but it's nearing a state where testing might soon become meaningful!

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #211925 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations

chris@cnc wrote: hello arvidb hello automata, i would also help as far as i can. My approach would be a 2nd acceleration time in the ini that defines the curve. So we can easily decide whether linear or in s-curve. And the curve defines, for example, the sigmoid function. Some servo manufacturers go this route and it works very well. I have no idea how to start this. what do you think of this idea?
Christian

Hi Christian!

I think a great way to start would be to make your algorithm move a specified distance. Looking at your plot above, your algorithm moves from v = 0.0 to v = 1.0. Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.

Then check that your peak velocity doesn't violate any "max velocity" (also specified as an input). If it does, insert a constant velocity segment.

Then make it work with initial velocity not zero.

And so on...
Last edit: 5 years 4 months ago by arvidb.
The following user(s) said Thank You: chris@cnc

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211954 by chris@cnc
Replied by chris@cnc on topic LinuxCNC S-Curve Accelerations

arvidb wrote: . Add a deceleration stage (from v = 1.0 to v = 0.0) and then scale peak velocity so that your algorithm ends up moving any distance that you specify as an input.

Hi arvidb,
You're right. It's a good idea to climb down the hill. :) But i can't do it.I can't do two calculations in a row. I can now control the length of the curve using a pin. My programming skills are not enough. I should leave it to people who know what they're doing. Try and error no longer leads to the goal.
Maybe someone else can make something of it. I can not...

Warning: Spoiler!
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211956 by rodw
Replied by rodw on topic LinuxCNC S-Curve Accelerations
Don't you just need to change the sign so values are negative to come back down? Could a direction pin to control that?
eg. Save the output first in an intermediate pin and then multiply by 1 or -1 before setting the out pin.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #211957 by chris@cnc
Replied by chris@cnc on topic LinuxCNC S-Curve Accelerations
Hi Rod,
Yes the reverse calculation is "out = 1 / ( 1+exp(counter));" But i am not able to set it in loop. I try it now since 6h but it doesn't work...

Please Log in or Create an account to join the conversation.

Time to create page: 5.990 seconds
Powered by Kunena Forum