Spindle speed oscillation, but not hunting
- Fianna
-
Topic Author
- Away
- New Member
-
Less
More
- Posts: 8
- Thank you received: 1
08 Jun 2025 06:49 #329931
by Fianna
Spindle speed oscillation, but not hunting was created by Fianna
Hi all,
Looking for some help with my closed loop spindle. It's a no-name "AT4" chinesium VFD driving a 3kW motor and a 2.2:1 belt drive to a BT30 spindle. Control is 0-5V from a 7i76e, encoder feedback from the motor shaft. The encoder is a 2500ppr unit I had left over so I'm only using the index pulse and have the encoder in counter mode because the A/B pulses were too fast. Encoder feedback into a 7i89.
Anyway, with P only control, I see the motor hunting a lot, a slow oscillation a few hundred rpm triangular wave, but I don't think it's as a result of too high P : there still a significant offset error so the oscillation is maintained even though the error is always a negative value (spindle slower than target). Lowering the P more increases the offset but doesn't change the amplitude or frequency of the oscillation, increasing P moves the speed closer to the setpoint but again no change in the oscillations. No screenshot but I can get one later on. Because it "hunts" even though the error is large and always one side of the setpoint makes me think it's not true hunting like a system with overly high P gain? The oscillation doesn't decay over time.. same behaviour with P anywhere from 0.8 to 10.
I reduced P way down (to 0.5) and tried to get it working by using D to stop the oscillation and I to actually hit the setpoint, but it's still a bit shit so I think it could be much improved. I added a ramp constraint to the speed command to stop the vfd erroring out. There's an accel limit on the VFD side too so maybe that's affecting the control loop?
It's getting to it's setpoint now but there's an over-acceleration initially, then a ramp that doesn't quite keep up, and then a weird over/undershoot/dip when the ramp ends and the I term seems to take over to slowly creep the speed to the setpoint.
Can anyone who knows controls better than me suggest a methodology to follow to improve this?
Looking for some help with my closed loop spindle. It's a no-name "AT4" chinesium VFD driving a 3kW motor and a 2.2:1 belt drive to a BT30 spindle. Control is 0-5V from a 7i76e, encoder feedback from the motor shaft. The encoder is a 2500ppr unit I had left over so I'm only using the index pulse and have the encoder in counter mode because the A/B pulses were too fast. Encoder feedback into a 7i89.
Anyway, with P only control, I see the motor hunting a lot, a slow oscillation a few hundred rpm triangular wave, but I don't think it's as a result of too high P : there still a significant offset error so the oscillation is maintained even though the error is always a negative value (spindle slower than target). Lowering the P more increases the offset but doesn't change the amplitude or frequency of the oscillation, increasing P moves the speed closer to the setpoint but again no change in the oscillations. No screenshot but I can get one later on. Because it "hunts" even though the error is large and always one side of the setpoint makes me think it's not true hunting like a system with overly high P gain? The oscillation doesn't decay over time.. same behaviour with P anywhere from 0.8 to 10.
I reduced P way down (to 0.5) and tried to get it working by using D to stop the oscillation and I to actually hit the setpoint, but it's still a bit shit so I think it could be much improved. I added a ramp constraint to the speed command to stop the vfd erroring out. There's an accel limit on the VFD side too so maybe that's affecting the control loop?
It's getting to it's setpoint now but there's an over-acceleration initially, then a ramp that doesn't quite keep up, and then a weird over/undershoot/dip when the ramp ends and the I term seems to take over to slowly creep the speed to the setpoint.
Can anyone who knows controls better than me suggest a methodology to follow to improve this?
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Platinum Member
-
Less
More
- Posts: 458
- Thank you received: 46
09 Jun 2025 17:33 - 10 Jun 2025 00:16 #330031
by langdons
Replied by langdons on topic Spindle speed oscillation, but not hunting
Belts introduce some delay into the system because they stretch a little bit.
You might be able to ameliorate the issue with some sort of smoothing circuit, like the one attached (designed by me).
0V means stopped, correct?
You might be able to ameliorate the issue with some sort of smoothing circuit, like the one attached (designed by me).
0V means stopped, correct?
Last edit: 10 Jun 2025 00:16 by langdons. Reason: Added schematic
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Platinum Member
-
Less
More
- Posts: 458
- Thank you received: 46
09 Jun 2025 17:40 #330032
by langdons
Replied by langdons on topic Spindle speed oscillation, but not hunting
What is the frequency of the oscilllation?
1Hz-ish?
1Hz-ish?
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18701
- Thank you received: 5161
09 Jun 2025 17:51 - 09 Jun 2025 17:59 #330034
by PCW
Replied by PCW on topic Spindle speed oscillation, but not hunting
That's actually rather strange behavior and may have to do with
the 7I76E analog output being unsigned.
Can you post your hal/ini files?
I would get open loop working well first with P,I,D == 0
and FF0 = 1, then try to slowly add some P and I
(you will never get good control without FF0)
Also plotting the PID output will help with diagnosis
the 7I76E analog output being unsigned.
Can you post your hal/ini files?
I would get open loop working well first with P,I,D == 0
and FF0 = 1, then try to slowly add some P and I
(you will never get good control without FF0)
Also plotting the PID output will help with diagnosis
Last edit: 09 Jun 2025 17:59 by PCW.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds