Servo Tuning Advice

More
31 Oct 2012 20:13 - 31 Oct 2012 20:19 #26128 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
And here is what adding FF1 does




It doesn't realy change the following error like I think it should, it does change the pid.errorI , and I can make that to be nearly 0 by adjusting FF1.
Attachments:
Last edit: 31 Oct 2012 20:19 by Todd Zuercher.

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

More
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)

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

More
31 Oct 2012 22:36 #26141 by andypugh
Replied by andypugh 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)

Is that possibly because he is plotting velocity in a position control loop?

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

More
31 Oct 2012 22:51 #26142 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Does this tell you anything?



Remember the drives are runnin in torque mode if that matters.
Attachments:

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

More
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...
Last edit: 31 Oct 2012 23:12 by PCW.

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

More
31 Oct 2012 23:10 #26147 by Todd Zuercher
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.

More
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?
Last edit: 31 Oct 2012 23:19 by PCW.

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

More
31 Oct 2012 23:32 #26149 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
I don't know why but now the pid.z.error is different with out changing anything.


I included both the hal and ini files with the last plot post.
Attachments:

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

More
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?)
Last edit: 01 Nov 2012 00:08 by PCW.

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

More
01 Nov 2012 00:44 #26153 by andypugh
Replied by andypugh on topic Servo Tuning Advice

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?)

I don't suppose the velocity-fb value plays some part in the PID error output?

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

Time to create page: 0.136 seconds
Powered by Kunena Forum