Spindle PID RPM oscillates under load

More
11 Mar 2025 13:09 - 11 Mar 2025 13:24 #323677 by Wischi
Hello guys,

i just started taking heavier cuts on my machine (Deckel FP2A) and i noticed that the rpm drops down, sometimes up to 150 rpm. The machine uses a 2.2 kW motor with a huanyang vfd. Between the motor and spindle is a belt drive as well as an gearbox (similar to the MAHO machines). Up until now i ran the spindle open loop. But since i added a encoder directly to the spindle i thought i could close the loop and use pid to counteract the rpm drops. I ran a couple of tests today but i was not able to keep the rpm steady under load. With all PID values at 0, except FF0 that was 1 during all the tests, i was already getting a good response (see halscope below). At around P=2 the over and undershoots started. So i tried P=0.5 and ran a test cut in mild steel (cut conditions below, machine should be more than capable for that). At the halscope you could see how to rpm drops and then oscillates. And the end of the cut the rpm came back up to the commanded speed. You can actually hear the rpm drop and accelerate.

I don't know how to continue from here, so i wish to get help from you guys! The pid with all values at 0 gives the best response but also makes it kind of useless. I attached a couple halscope diagrams of different tests below. They are always three: spindle startup, idling and under load. I also tired higher P values just to see if the pid is working. My spindle hal section is pretty much the default pncconf, only added the gearbox and vfd stuff (gear selection etc.). This might as well be a vfd issue, so i included my parameters that i have changed after a factory reset.

Thank you!

Cut conditions:
Warning: Spoiler!


Huanyang VFD HY04D043B 4kw 380V motor is wired in star config
Parameters:
Warning: Spoiler!
Last edit: 11 Mar 2025 13:24 by Wischi. Reason: Wrong attachment

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

More
11 Mar 2025 13:34 - 11 Mar 2025 16:13 #323678 by PCW
Replied by PCW on topic Spindle PID RPM oscillates under load
You may be able to reduce the overshoot by using
the PID components maxerror pin. This should allow
higher P (and I) terms.

Also anything in the VFD setup that slows response
will limit the highest stable P term.
Last edit: 11 Mar 2025 16:13 by PCW.

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

More
13 Mar 2025 10:19 - 13 Mar 2025 14:26 #323818 by Wischi
Replied by Wischi on topic Spindle PID RPM oscillates under load
Thank you for the input!

Just got back to the machine.

Was not sure what value to set maxerror to so i started with 0.001. It did pretty much eliminated all overshoot, but i also feel that the P value has no effect anymore. A P value of 5 or 100 have the same response curve.

I tried milling with P=2 and maxerror=0.001 but still got a rpm drop of about 70 revolutions. Also tried P=5 and got a drop of 130 revolutions!

If i up the feedrate while under load i have the feeling i could easily stall the spindle.

Maybe the vfd is faulty?´

Also anything in the VFD setup that slows response will limit the highest stable P term.


Would reducing or disabling the startup acceleration also count here?

I attached a image of halscope with encoder feedback, speed cmd and pid output. The pid is working and trying to combat the drop, so maybe the spindle gearbox is not dynamic enough to respond quick enough? In the image the difference is not so big but again if i increase the load the difference gets much bigger.
Attachments:
Last edit: 13 Mar 2025 14:26 by Wischi.

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

More
14 Mar 2025 00:53 #323881 by PCW
Replied by PCW on topic Spindle PID RPM oscillates under load
Since the units of maxerror are RPM, I would start with say 25 or 50
(.001 RPM as you found will simply operate as open loop)

Also limiting the rate of change of commanded RPM (with the limit component)
will reduce overshoot
 

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

Time to create page: 0.099 seconds
Powered by Kunena Forum