Servo Tuning Advice
30 Oct 2012 23:14 #26077
by andypugh
Replied by andypugh on topic Servo Tuning Advice
The PID isn't happy with negative coefficients, but you don't have that, so it ought to be OK.Are there any simple tricks to make the ouput scale positive? I wonder if I have a positive/negative problem screwing with the PID math..
Please Log in or Create an account to join the conversation.
30 Oct 2012 23:32 #26080
by PCW
Replied by PCW on topic Servo Tuning Advice
You can see how slowly the I term slews the PID output at the end of motion
with say 300u of error, so it still seems way to slow to me
What about I = 500,000
with say 300u of error, so it still seems way to slow to me
What about I = 500,000
Please Log in or Create an account to join the conversation.
30 Oct 2012 23:35 #26081
by andypugh
This might be one of those times that the ability to vary I with error would be useful.
Replied by andypugh on topic Servo Tuning Advice
You can see how slowly the I term slews the PID output at the end of motion
with say 300u of error, so it still seems way to slow to me
What about I = 500,000
This might be one of those times that the ability to vary I with error would be useful.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
31 Oct 2012 01:09 - 31 Oct 2012 01:12 #26088
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
I tried the 500K and things came in line faster, so I went nuts and tried 1 million and 10million, at 10 million it finally became unstable during the move
so I backed it off to 4million and this is what it looks like. Now the following error seems to be proportional to the velocity. Changing FF1 doesn't seem to change it, (at FF1=+/-500 it became unstable)
so I backed it off to 4million and this is what it looks like. Now the following error seems to be proportional to the velocity. Changing FF1 doesn't seem to change it, (at FF1=+/-500 it became unstable)
Last edit: 31 Oct 2012 01:12 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
31 Oct 2012 01:46 #26090
by PCW
Replied by PCW on topic Servo Tuning Advice
Something odd is going on here, the I term should pull in the ferror during the cruise phase but its doing nothing (flat top on ferror during cruise)
Is it possible you have the pid.N.maxerrorI set so its limiting the contribution of the intergral term to the PID output?
you can plot the PID integral term to trace this issue
Also FF1 should make a visible difference in the following error but you have to adjust is in small increments and note the sign of the error (and a negative FF1 is never right)
FF1 cannot cause instability by itself (its not a feedback or gain term) but it can cause big errors that may trigger other latent instabilities
Is it possible you have the pid.N.maxerrorI set so its limiting the contribution of the intergral term to the PID output?
you can plot the PID integral term to trace this issue
Also FF1 should make a visible difference in the following error but you have to adjust is in small increments and note the sign of the error (and a negative FF1 is never right)
FF1 cannot cause instability by itself (its not a feedback or gain term) but it can cause big errors that may trigger other latent instabilities
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
31 Oct 2012 02:31 #26093
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
There are no pid.N.maxerrorI lines in my hal file.
A negagive FF1 is what gave the best result during crusing before I added all this I.
So this is starting to sound like something might be wonky somewhere, but what?
How do I plot the PID integral term? I could not find a pin or signal for it.
A negagive FF1 is what gave the best result during crusing before I added all this I.
So this is starting to sound like something might be wonky somewhere, but what?
How do I plot the PID integral term? I could not find a pin or signal for it.
Please Log in or Create an account to join the conversation.
31 Oct 2012 02:45 #26094
by PCW
Replied by PCW on topic Servo Tuning Advice
you have to enable debug for the PID comp to spill-its-guts
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
31 Oct 2012 03:07 #26095
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Where do I put the debug=1?
Please Log in or Create an account to join the conversation.
31 Oct 2012 03:13 #26096
by PCW
Replied by PCW on topic Servo Tuning Advice
man pid
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
Topic Author
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
31 Oct 2012 19:30 #26125
by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning Advice
Please Log in or Create an account to join the conversation.
Time to create page: 0.222 seconds