trajectory acceleration is half the value in config file
- southbayguy
- Offline
- Senior Member
Less
More
- Posts: 63
- Thank you received: 1
05 Sep 2023 02:42 #279913
by southbayguy
Hi -
I'm interested in finding a good acceleration value for my three-axis router, for fast part program execution without harsh motion. The first thing to do is to push acceleration to the point where the actual velocity profile can't achieve the same sloppe as the desired velocity profile. My machine uses a Motenc-Lite PCI motion control interface board from Vital Systems, so the motion parameters are in linuxcnc/configs/motenc/motenc.ini.
In the TRAJ section of motenc.ini, I set MAX_ACCELERATION to 40, and I also set it to 40 in the AXIS_0 section.
Then I did a .5 inch X+ move at 1 inch per second (G1 X.5 F60.) and recorded the desired and actual positions of the X axis at each servo heartbeat (every millisecond). I used SciLab to differentiate the positions to obtain velocities. I plotted the velocities. It took about 50 milliseconds for the velocity profile to reach speed, so the acceleration was 20 in/sec/sec ... or half the value I had entered in motenc.ini.
I wondered if I had made a mistake. I repeated the experiment, making sure to re-start LOinuxCNC so it would have to read the motenc.ini file. I got the same result. I wondered if for some reason LinuxCNC was ignoring the motenc.ini file and using a 20 in/sec/sec acceleration value instead. To test this last possibility, I double the value for MAX_ACCELERATION two places in motenc.ini and re-ran the experiment.
This time, it looks like indeed the system is reading the motenc.ini file and using the MAX_ACCELERATION value. Once again it is half the value in the file.
I'll attempt to attach a .jpg showing the plot.
The smooth trace is desired velocity. The jagged trace is actual velocity. Differentiating real world data always produces a jagged trace. These are actually pretty good plots.
You can see the system reaches speed in about 25 milliseconds, which is consistent with an accel value of 40.
40 in/sec/sec x .025 sec = 1 in/sec.
Maybe somebody else has seen this same thing.
I'm interested in finding a good acceleration value for my three-axis router, for fast part program execution without harsh motion. The first thing to do is to push acceleration to the point where the actual velocity profile can't achieve the same sloppe as the desired velocity profile. My machine uses a Motenc-Lite PCI motion control interface board from Vital Systems, so the motion parameters are in linuxcnc/configs/motenc/motenc.ini.
In the TRAJ section of motenc.ini, I set MAX_ACCELERATION to 40, and I also set it to 40 in the AXIS_0 section.
Then I did a .5 inch X+ move at 1 inch per second (G1 X.5 F60.) and recorded the desired and actual positions of the X axis at each servo heartbeat (every millisecond). I used SciLab to differentiate the positions to obtain velocities. I plotted the velocities. It took about 50 milliseconds for the velocity profile to reach speed, so the acceleration was 20 in/sec/sec ... or half the value I had entered in motenc.ini.
I wondered if I had made a mistake. I repeated the experiment, making sure to re-start LOinuxCNC so it would have to read the motenc.ini file. I got the same result. I wondered if for some reason LinuxCNC was ignoring the motenc.ini file and using a 20 in/sec/sec acceleration value instead. To test this last possibility, I double the value for MAX_ACCELERATION two places in motenc.ini and re-ran the experiment.
This time, it looks like indeed the system is reading the motenc.ini file and using the MAX_ACCELERATION value. Once again it is half the value in the file.
I'll attempt to attach a .jpg showing the plot.
The smooth trace is desired velocity. The jagged trace is actual velocity. Differentiating real world data always produces a jagged trace. These are actually pretty good plots.
You can see the system reaches speed in about 25 milliseconds, which is consistent with an accel value of 40.
40 in/sec/sec x .025 sec = 1 in/sec.
Maybe somebody else has seen this same thing.
Attachments:
Please Log in or Create an account to join the conversation.
05 Sep 2023 04:13 #279922
by rodw
Replied by rodw on topic trajectory acceleration is half the value in config file
In my torture testing >36m/min rapids and 5 to 8 m/sec/sec accel
Steppers loose steps when they get hot.
I found that by using Lam Technologies drivers, I could use their boost setting and a custom component to reduce current when at constant velocity to say 30-50% of peak. This let the motors cool and substantially increase performance as they are only working flat out on accelleration and decelleration. Cutting at 2 m/min, that meant that the high current was only aplied for about 30 ms at the beginning and end of a segment.
By just looking at your desired vs actual profile, you are not looking at the performance impaact of heat. So its likely that your finely tuned configuration will fail once it does some real work. THe result won't be pretty Trust me!
Steppers loose steps when they get hot.
I found that by using Lam Technologies drivers, I could use their boost setting and a custom component to reduce current when at constant velocity to say 30-50% of peak. This let the motors cool and substantially increase performance as they are only working flat out on accelleration and decelleration. Cutting at 2 m/min, that meant that the high current was only aplied for about 30 ms at the beginning and end of a segment.
By just looking at your desired vs actual profile, you are not looking at the performance impaact of heat. So its likely that your finely tuned configuration will fail once it does some real work. THe result won't be pretty Trust me!
Please Log in or Create an account to join the conversation.
- southbayguy
- Offline
- Senior Member
Less
More
- Posts: 63
- Thank you received: 1
05 Sep 2023 14:20 #279975
by southbayguy
Replied by southbayguy on topic trajectory acceleration is half the value in config file
Thank you for the reply.
Pushing the motors too hard is a topic but not really what I'm interested in right now. I'm more concerned about the how actual acceleration is half the value specified in the config file.
I found a forum post from 2019 by dm17ry that is almost identical, finding actual acceleration (in some cases) is exactly half the config value. I don't see any resolution or explanation in that earlier case.
Pushing the motors too hard is a topic but not really what I'm interested in right now. I'm more concerned about the how actual acceleration is half the value specified in the config file.
I found a forum post from 2019 by dm17ry that is almost identical, finding actual acceleration (in some cases) is exactly half the config value. I don't see any resolution or explanation in that earlier case.
Please Log in or Create an account to join the conversation.
05 Sep 2023 14:28 #279978
by andypugh
Replied by andypugh on topic trajectory acceleration is half the value in config file
Is it the same if you max-out the feed override?
It is possible that the TP is leaving some overhead to allow for changes to FO in real time.
It is possible that the TP is leaving some overhead to allow for changes to FO in real time.
Please Log in or Create an account to join the conversation.
05 Sep 2023 19:05 #280017
by PCW
Replied by PCW on topic trajectory acceleration is half the value in config file
Attachments:
Please Log in or Create an account to join the conversation.
05 Sep 2023 19:33 #280021
by Aciera
Replied by Aciera on topic trajectory acceleration is half the value in config file
Link to the mentioned thread by dm17ry:
forum.linuxcnc.org/49-basic-configuratio...eration-value#128957
forum.linuxcnc.org/49-basic-configuratio...eration-value#128957
Please Log in or Create an account to join the conversation.
- southbayguy
- Offline
- Senior Member
Less
More
- Posts: 63
- Thank you received: 1
06 Sep 2023 00:31 #280038
by southbayguy
Replied by southbayguy on topic trajectory acceleration is half the value in config file
Thank you for the replies.
For some reason I'm not seeing the button for attaching a file, so I'm going to paste my motenc.ini file in here. I'm finding I have to specify MAX_ACCELERATION at 80 in/sec/sec in order to actually get 40 in/sec/sec.
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# General section
[EMC]
# Version of this INI file
VERSION = $Revision$
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-MOTENC
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
# Sections for display options
[DISPLAY]
# Name of display program, e.g., tkemc
DISPLAY = tkemc
#DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tklinucnc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
# Prefix to be used
PROGRAM_PREFIX = /home/robert/linuxcnc/nc_files/robert_gcode_files
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = motenc.var
# Motion control section
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
# Hardware Abstraction Layer section
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_servo.hal
HALFILE = motenc_motion.hal
HALFILE = motenc_io.hal
# rwp add 6/1/14
HALFILE = axisWatch.hal
# rwp add 7/2/16
HALFILE = handwheelFile.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Trajectory planner section
[TRAJ]
AXES = 3
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 3.0
MAX_VELOCITY = 4.0
DEFAULT_ACCELERATION = 6.
MAX_ACCELERATION = 80.
# Axes sections
# First axis
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -25.03
MAX_LIMIT = 0.03
FERROR = .2
MIN_FERROR = .020
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# Second axis
[AXIS_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -24.53
MAX_LIMIT = 0.03
FERROR = 0.2
MIN_FERROR = 0.020
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# Third axis
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -8.03
MAX_LIMIT = 0.03
FERROR = 0.2
MIN_FERROR = 0.199
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# section for main IO controller parameters
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = motenc.tbl
For some reason I'm not seeing the button for attaching a file, so I'm going to paste my motenc.ini file in here. I'm finding I have to specify MAX_ACCELERATION at 80 in/sec/sec in order to actually get 40 in/sec/sec.
# EMC controller parameters for generic controller. Make these what you need
# for your system.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.
# General section
[EMC]
# Version of this INI file
VERSION = $Revision$
# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-MOTENC
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0
# Sections for display options
[DISPLAY]
# Name of display program, e.g., tkemc
DISPLAY = tkemc
#DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tklinucnc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
# Prefix to be used
PROGRAM_PREFIX = /home/robert/linuxcnc/nc_files/robert_gcode_files
# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
# Task controller section
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
# Part program interpreter section
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = motenc.var
# Motion control section
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
# Hardware Abstraction Layer section
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = core_servo.hal
HALFILE = motenc_motion.hal
HALFILE = motenc_io.hal
# rwp add 6/1/14
HALFILE = axisWatch.hal
# rwp add 7/2/16
HALFILE = handwheelFile.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
# Trajectory planner section
[TRAJ]
AXES = 3
# COORDINATES = X Y Z R P W
COORDINATES = X Y Z
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 3.0
MAX_VELOCITY = 4.0
DEFAULT_ACCELERATION = 6.
MAX_ACCELERATION = 80.
# Axes sections
# First axis
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -25.03
MAX_LIMIT = 0.03
FERROR = .2
MIN_FERROR = .020
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# Second axis
[AXIS_1]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -24.53
MAX_LIMIT = 0.03
FERROR = 0.2
MIN_FERROR = 0.020
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# Third axis
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 4
MAX_ACCELERATION = 80.0
BACKLASH = 0.000
INPUT_SCALE = 10160
OUTPUT_SCALE = 10
OUTPUT_OFFSET = 0
MIN_LIMIT = -8.03
MAX_LIMIT = 0.03
FERROR = 0.2
MIN_FERROR = 0.199
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = -5
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES
MAX_OUTPUT = 1
# PID tuning params
DEADBAND = 0.000015
P = 50
I = 0
D = 2
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
# section for main IO controller parameters
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = motenc.tbl
Please Log in or Create an account to join the conversation.
06 Sep 2023 05:17 - 06 Sep 2023 06:23 #280053
by JPL
To be able to add attachments you need to use the full editor (where there is an "Attachments" button):
When you're in the quick editor click on the "Go to editor..." link on the bottom right of the editor.
Or, instead of clicking "Quick Reply" you will use the "Action" button then select "Reply topic" (or "Reply" in the context of a specific post).
Replied by JPL on topic trajectory acceleration is half the value in config file
That's because you are using the "quick Reply" button.... For some reason I'm not seeing the button for attaching a file ...
To be able to add attachments you need to use the full editor (where there is an "Attachments" button):
When you're in the quick editor click on the "Go to editor..." link on the bottom right of the editor.
Or, instead of clicking "Quick Reply" you will use the "Action" button then select "Reply topic" (or "Reply" in the context of a specific post).
Last edit: 06 Sep 2023 06:23 by JPL.
Please Log in or Create an account to join the conversation.
06 Sep 2023 06:32 #280061
by roland
Replied by roland on topic trajectory acceleration is half the value in config file
There are differences in the calculation of acceleration.
It is dependent on G61/G64/MDI/Jog
See: forum.linuxcnc.org/38-general-linuxcnc-q...nce-too-long?start=0
It is dependent on G61/G64/MDI/Jog
See: forum.linuxcnc.org/38-general-linuxcnc-q...nce-too-long?start=0
Please Log in or Create an account to join the conversation.
06 Sep 2023 11:22 #280090
by Aciera
Replied by Aciera on topic trajectory acceleration is half the value in config file
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.123 seconds