Servo Tuning Advice
- Todd Zuercher
- Topic Author
- Away
- Platinum Member
Less
More
- Posts: 5039
- Thank you received: 1431
31 Oct 2012 20:13 - 31 Oct 2012 20:19 #26128
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Last edit: 31 Oct 2012 20:19 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
31 Oct 2012 22:30 #26139
by PCW
Replied by PCW on topic Servo Tuning Advice
This and the previous plot seem to indicate that something is wrong in the hal file (a large ferror that the integral term is ignoring in the first plot and FF1 acting like FF2 in the second)
Can you plot pid.1.error (it should be the same as ferror)
Can you plot pid.1.error (it should be the same as ferror)
Please Log in or Create an account to join the conversation.
31 Oct 2012 22:36 #26141
by andypugh
Replied by andypugh on topic Servo Tuning Advice
Is that possibly because he is plotting velocity in a position control loop?This and the previous plot seem to indicate that something is wrong in the hal file (a large ferror that the integral term is ignoring in the first plot and FF1 acting like FF2 in the second)
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Away
- Platinum Member
Less
More
- Posts: 5039
- Thank you received: 1431
31 Oct 2012 22:51 #26142
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Please Log in or Create an account to join the conversation.
31 Oct 2012 23:05 - 31 Oct 2012 23:12 #26145
by PCW
Replied by PCW on topic Servo Tuning Advice
This means that the PID loop is not looking at the same parameters as ferror which suggests there is a wiring error since they both should be looking at the difference in commanded and actual POSITION
And of course if the PID comps idea of what an error is is different from what you are trying to minimize, you are going to be running around in circles...
And of course if the PID comps idea of what an error is is different from what you are trying to minimize, you are going to be running around in circles...
Last edit: 31 Oct 2012 23:12 by PCW.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Away
- Platinum Member
Less
More
- Posts: 5039
- Thank you received: 1431
31 Oct 2012 23:10 #26147
by Todd Zuercher
Then Maybe I should try adding some FF0?
Replied by Todd Zuercher on topic Servo Tuning Advice
This and the previous plot seem to indicate that something is wrong in the hal file (a large ferror that the integral term is ignoring in the first plot and FF1 acting like FF2 in the second)
Then Maybe I should try adding some FF0?
Please Log in or Create an account to join the conversation.
31 Oct 2012 23:16 - 31 Oct 2012 23:19 #26148
by PCW
Replied by PCW on topic Servo Tuning Advice
It is not going to be possible to tune this without figuring out whats wrong and fixing it. You can see the the PID loop is doing the best it can to minimize pid.1.error but for some reason (incorrect connections or execution order in HAL maybe) this is not the same as ferror
can you post your current hal file here?
can you post your current hal file here?
Last edit: 31 Oct 2012 23:19 by PCW.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Topic Author
- Away
- Platinum Member
Less
More
- Posts: 5039
- Thank you received: 1431
31 Oct 2012 23:32 #26149
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Please Log in or Create an account to join the conversation.
31 Oct 2012 23:59 - 01 Nov 2012 00:08 #26151
by PCW
Replied by PCW on topic Servo Tuning Advice
I dont see anything obvious in the hal file but something is really broken
I guess the next step is to find out who calculates ferror and why is it not the same as pid.2.error (is it passed through Axis to motion?)
You can see the as far as the PID loop goes things are under control (pid.z.error nearly 0 )the PID loop does not see the ferror at all.
So either the inputs to the PID loop are not correct somehow, whoever calculates ferror is not getting the right info or some other subtle bug, This is definitely an error of some kind.
Also since the ferror seems proportional to velocity I wonder if theres a pipelining issue where
there a one sample delay between the commanded and actual positions that the ferror calculation uses (is the ferror ~ distance per ms?)
I guess the next step is to find out who calculates ferror and why is it not the same as pid.2.error (is it passed through Axis to motion?)
You can see the as far as the PID loop goes things are under control (pid.z.error nearly 0 )the PID loop does not see the ferror at all.
So either the inputs to the PID loop are not correct somehow, whoever calculates ferror is not getting the right info or some other subtle bug, This is definitely an error of some kind.
Also since the ferror seems proportional to velocity I wonder if theres a pipelining issue where
there a one sample delay between the commanded and actual positions that the ferror calculation uses (is the ferror ~ distance per ms?)
Last edit: 01 Nov 2012 00:08 by PCW.
Please Log in or Create an account to join the conversation.
01 Nov 2012 00:44 #26153
by andypugh
Replied by andypugh on topic Servo Tuning Advice
I don't suppose the velocity-fb value plays some part in the PID error output?I guess the next step is to find out who calculates ferror and why is it not the same as pid.2.error (is it passed through Axis to motion?)
Please Log in or Create an account to join the conversation.
Time to create page: 0.130 seconds