Mesa 7i77 and linear encoder tuning PID.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 600000
BASE_PEROID = 600000
AXES = 3
COORDINATES = X Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
TRAJ_PERIOD = 600000
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 2
MAX_LINEAR_VELOCITY = 50
MAX_ACCELERATION = 300
NO_FORCE_HOMING = 1
#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
MAX_VELOCITY = 50
MAX_ACCELERATION = 100
.....
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-output => pid.x.output
net x-pos-cmd => pid.x.command
net x-vel-fb => pid.x.feedback-deriv
net x-pos-fb => pid.x.feedback
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [AXIS_0]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout0-minlim [AXIS_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
net x-output => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd axis.0.motor-pos-cmd
net x-enable axis.0.amp-enable-out
# enable _all_ sserial pwmgens
net x-enable hm2_5i25.0.7i77.0.1.analogena
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 0
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [AXIS_0]ENCODER_SCALE
net x-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
net x-pos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
Please Log in or Create an account to join the conversation.
It looks like you need more P gain but you already have some oscillation so have you tried increasing the D term to eliminate this?
On the 1000 mm/sec move you can see where a little FF2 can be used to cancel the errors during the accel and decel phase
The lack of P gain (stiffness) is fairly obvious in most moves because of the stiction (the spike at the beginning)
(I was wrong before its not excessive acceleration that causes the spike but rather low gain and insufficient D term)
Think of torque mode as pulling your axis around with a spring (where the P term is the spring stiffness)
if you look at the expanded 50 mm/s move you can see the the mechanics did not even start moving until about 12 ms despite being commanded to move (this needs more P gain (which needs more D gain for stability), some FF2 and perhaps some I)
Please Log in or Create an account to join the conversation.
Some things to consider:Unintuitive Omron drive params .... www.linuxcnc.org/media/kunena/attachment...mages/Untitled_1.jpg
How did you get the configurations values of the drive ? with autotune or something like that ?
The drive seems to support velocity command, perhaps it is better to use it.
Try setting the minimun in "torque command filter time constant" in order to have a better initial response.
my two cents
Please Log in or Create an account to join the conversation.
Drive has two sets of inputs, speed and torque.
I’m connected to speed, not torque.... Tried torque with disastrous results.
Params related to torque input, have no effect, seemingly position loop also.
VNR – hi ...... drive wont auto tune.
Params arrived at by working my way from defaults and from one extreme to the other for most combinations – hence weeks ....
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Feedback is from a Heidenhain linear encoder with 10 micron grating pitch via 256 X interpolation giving a resolution of 0.0000390625 mm at 25600 counts per mm. Single ended encoder output is connected to a Mesa 7i77.
Other things to consider:The servo drive can output 2048 quadrature pulse per revolution. If I connect this to a spare encoder channel and use this as velocity feedback, would this
- Usually Position Loop Gain is 1/4 of Speed Loop Gain (parameters of the drive).
- Instead of the linear encoder, use only the encoder output of the drive to see what happens.
- What happens if you use MAX_ACCELERATION 1/2 of MAX_VELOCITY ?
- What happens if you put SERVO_PERIOD = TRAJ_PERIOD * 0.5 (or 0.25) ? (and coment BASE_PERIOD if you are not using it).
- Do you have a another filter, feed-forward or delay parameter in the drive ?
Please Log in or Create an account to join the conversation.
Thats why I thought it was in torque mode as it was unresponsive to velocity commands (that 12 ms delay).
Please Log in or Create an account to join the conversation.