Spindle PID control

More
9 years 7 months ago #90504 by andypugh
Replied by andypugh on topic Spindle PID control
It looks like you do not have any feedback, so the PID will, as you have noticed, ramp up indefinitely.

You probably have spindle speed into HAL from the encoder? You will need to pass this through an ABS component and into the spindle-vel-fb-rpm-abs signal.

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

More
9 years 7 months ago - 9 years 7 months ago #90506 by vilts
Replied by vilts on topic Spindle PID control
Thanks, that makes sense.

To see if that really made sense, here's the spindle speed part from my current config
Code:
setp scale.spindle.gain 60 setp lowpass.spindle.gain 0.005000 net spindle-vel-fb-rps => scale.spindle.in net spindle-fb-rpm scale.spindle.out => abs.spindle.in net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in net spindle-fb-rpm-abs-filtered lowpass.spindle.out

So, to connect the abs spindle speed to the pid feedback I'd need to do this:
Code:
net spindle-vel-fb-rpm-abs <= lowpass.spindle.out

Or should I use the non-lowpassed abs value for feedback?
Last edit: 9 years 7 months ago by vilts.

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

More
9 years 7 months ago #90511 by andypugh
Replied by andypugh on topic Spindle PID control
This is starting to look like just a confusion about signal names.

Try changing:
net spindle-vel-fb-rpm-abs => pid.s.feedback

to
net spindle-fb-rpm-abs => pid.s.feedback

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

More
9 years 6 months ago #90883 by vilts
Replied by vilts on topic Spindle PID control
I got this working with lincurve, that is nice.

I tried many-many combinations to get the PID control loop working, but to no avail. Just couldn't get it stable. Method I tried was to increase the P until output started oscillating (happened at around P=4) and the started increasing I to get rid of the oscillation. But increasing I never got rid of the oscillation, and at some higher levels it started to increase it.

Was this method wrong somehow? How should it actually be done and what are the approx numbers the P, I and D? 0.1, 1, 10, 100, 1000? I have no idea.

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

More
9 years 6 months ago - 9 years 6 months ago #90885 by PCW
Replied by PCW on topic Spindle PID control
For a velocty PID loop probably the most important part is FF0
(if the PID feedback, command and output are all in RPM, FF0 should be 1.0)

If you have only FF0(all other PID terms=0), you are running open loop
(because the PID output is just FF0*Command)

Using the FF0 feedforward term make the PID output approximately correct before any
feedpack is applied. This makes the P and I terms have less work to do...

You will always get oscillation on a PID system if you increase any P,I,D term too high
I would try using less P (say 2) and then see how high an I term you can have and stay stable
D term should not be needed
Last edit: 9 years 6 months ago by PCW.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum