- Posts: 58
- Thank you received: 2
combining two feedback devices, rotary axis
- johns00056
- Offline
- Senior Member
-
Less
More
10 years 11 months ago - 10 years 11 months ago #65142
by johns00056
Replied by johns00056 on topic combining two feedback devices, rotary axis
I got this working now. the main problem was that I had pid.N.MAX_OUTPUT set to 1. When the output reached 1, the pid output went to zero, which stopped all movement. I fixed that by setting pid.N.MAX_OUTPUT to 0, which disabled that feature.
Summing the two pid's together did not do what I wanted so I ended up using the cascaded pid method ,as Andy suggested.
The axis does have some backlash. I measure about .010 inch backlash at 19 inches diameter , but only about .0005 inch at 4 inch diameter.
I think that most of the backlash comes from the "low backlash" Bayside planetary gear reducer.
I am very happy with the positioning accuracy. If I push the axis , with my hand, from one side of the backlash to the other , the motor will return it to the correct spot in about 1/2 second.
As a test I loosened the belts and shifted the position of the table , to simulate the belts slipping under load. When I cleared the following error and restarted the program , the axis went right back to the correct position within .001 inch.
I ran a test program for an hour which rotated a block of metal to a dial indicator , then away 270 degrees, repeated 500 times. The dial indicator showed no change in zero, although at certain speeds the axis would under shoot or overshoot a little bit. I had to add a 2 second dwell at zero to give it time to creep the programmed position.
(the axis has a brake to hold position during heavy cuts.)
I am homing to the home switch only and not using the encoder index.
################### 11/7/15 cascaded pid ###
# the position command goes first to pid.5 then to pid.3 and then to the servo drive
# this allows the friction wheel encoder to correct position errors caused by v-belt creep
net motor.04.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.05.position => pid.5.feedback => axis.3.motor-pos-fb # friction encoder, position only, to pid.5
#push copy back to Axis GUI
net motor.03.vel-fb hm2_[HOSTMOT2](BOARD).0.encoder.03.velocity => pid.3.feedback # velocity only , feedback to pid.3 (motor encoder)
net emcmot.03.pos-cmd axis.3.motor-pos-cmd => pid.5.command # command in to pid.5 for friction wheel encoder
net october1 pid.5.output => scale.3.in # scale component to make friction wheel encoder output the same scale as motor encoder output
net nov7 scale.3.out => pid.3.command # pid.3 for motor encoder
net nov71 pid.3.output => bldc.3.value # in to brushless D.C. component
net motor.03.current bldc.3.out => hm2_[HOSTMOT2](BOARD).0.8i20.1.1.current # command to motor servo drive
############ 11/11/15 pid settings #################
# pid.3 (motor encoder) ### pid.5 (friction wheel encoder)
# P 0.13 ################### P 2
# I .0001 ### ################ I 4
# D 0 ###################### D 0
# FF1 .003############# ###### FF1 0.6
Summing the two pid's together did not do what I wanted so I ended up using the cascaded pid method ,as Andy suggested.
The axis does have some backlash. I measure about .010 inch backlash at 19 inches diameter , but only about .0005 inch at 4 inch diameter.
I think that most of the backlash comes from the "low backlash" Bayside planetary gear reducer.
I am very happy with the positioning accuracy. If I push the axis , with my hand, from one side of the backlash to the other , the motor will return it to the correct spot in about 1/2 second.
As a test I loosened the belts and shifted the position of the table , to simulate the belts slipping under load. When I cleared the following error and restarted the program , the axis went right back to the correct position within .001 inch.
I ran a test program for an hour which rotated a block of metal to a dial indicator , then away 270 degrees, repeated 500 times. The dial indicator showed no change in zero, although at certain speeds the axis would under shoot or overshoot a little bit. I had to add a 2 second dwell at zero to give it time to creep the programmed position.
(the axis has a brake to hold position during heavy cuts.)
I am homing to the home switch only and not using the encoder index.
################### 11/7/15 cascaded pid ###
# the position command goes first to pid.5 then to pid.3 and then to the servo drive
# this allows the friction wheel encoder to correct position errors caused by v-belt creep
net motor.04.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.05.position => pid.5.feedback => axis.3.motor-pos-fb # friction encoder, position only, to pid.5
#push copy back to Axis GUI
net motor.03.vel-fb hm2_[HOSTMOT2](BOARD).0.encoder.03.velocity => pid.3.feedback # velocity only , feedback to pid.3 (motor encoder)
net emcmot.03.pos-cmd axis.3.motor-pos-cmd => pid.5.command # command in to pid.5 for friction wheel encoder
net october1 pid.5.output => scale.3.in # scale component to make friction wheel encoder output the same scale as motor encoder output
net nov7 scale.3.out => pid.3.command # pid.3 for motor encoder
net nov71 pid.3.output => bldc.3.value # in to brushless D.C. component
net motor.03.current bldc.3.out => hm2_[HOSTMOT2](BOARD).0.8i20.1.1.current # command to motor servo drive
############ 11/11/15 pid settings #################
# pid.3 (motor encoder) ### pid.5 (friction wheel encoder)
# P 0.13 ################### P 2
# I .0001 ### ################ I 4
# D 0 ###################### D 0
# FF1 .003############# ###### FF1 0.6
Last edit: 10 years 11 months ago by johns00056.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
10 years 11 months ago #65143
by andypugh
I am glad that worked. I had actually begun to wonder if you had had enough and given up when there was no reply for a few days.
You may find that more I-term gets that last bit of error out quicker.
Replied by andypugh on topic combining two feedback devices, rotary axis
johns00056 wrote: Summing the two pid's together did not do what I wanted so I ended up using the cascaded pid method ,as Andy suggested.
I am glad that worked. I had actually begun to wonder if you had had enough and given up when there was no reply for a few days.
You may find that more I-term gets that last bit of error out quicker.
Please Log in or Create an account to join the conversation.
- johns00056
- Offline
- Senior Member
-
Less
More
- Posts: 58
- Thank you received: 2
10 years 11 months ago #65146
by johns00056
Replied by johns00056 on topic combining two feedback devices, rotary axis
Thanks for the help. I was pretty close to giving up, but I pushed on .
Next time I will think long and hard before trying an unconventional approach in a field where I am not an expert.
I am sure that I can get it tuned better, but I am going to run it as is for now.
Next time I will think long and hard before trying an unconventional approach in a field where I am not an expert.
I am sure that I can get it tuned better, but I am going to run it as is for now.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
10 years 11 months ago #65147
by andypugh
But now you are the World Expert, you realise?
Replied by andypugh on topic combining two feedback devices, rotary axis
johns00056 wrote: Next time I will think long and hard before trying an unconventional approach in a field where I am not an expert.
But now you are the World Expert, you realise?
Please Log in or Create an account to join the conversation.
Time to create page: 0.249 seconds