PID loop tuning (ringing at destination)
- slowpoke
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 206
- Thank you received: 28
			
	
						26 Mar 2024 18:18		 -  26 Mar 2024 18:24		#296826
		by slowpoke
	
	
		
			
	
	
		
	
			 		
													
	
				PID loop tuning (ringing at destination) was created by slowpoke			
			
				I thought it best to start a new thread specific to this PID tuning issue.
System: ac servo driving ballscrew with linear scale feedback to Mesa 7i95t. I'm using the Axis interface
I have played with the PID tuning parameters a fair bit and have the table moves operating quite well except for small displacement ringing at the destination. I'm wondering if anyone has any suggestions. I have included a couple of HalScope plots that show the issue. I have made two configurations (one open loop and one closed loop).
					System: ac servo driving ballscrew with linear scale feedback to Mesa 7i95t. I'm using the Axis interface
I have played with the PID tuning parameters a fair bit and have the table moves operating quite well except for small displacement ringing at the destination. I'm wondering if anyone has any suggestions. I have included a couple of HalScope plots that show the issue. I have made two configurations (one open loop and one closed loop).
- The open loop configuration without backlash compensation works well except an error of ~0.005" occurs when changing directions.
- The open loop configuration with backlash compensation works better error is typically ~0.001" occurs when changing directions.
- The closed loop configuration with low gain P<=200 is accurate, however slow especially towards the destination
- The closed loop configuration with higher gain P=600 is accurate and fast, however upon reaching the destination point the servo slowly oscillates and continues to oscillate typically +/- 0.001". If I disable and then re-enable the servo at the destination it stops hunting.
 
 
 Note: for the P=600 case (deadband=0.0004" and maxerror=0.0005"), if I set deadband > max error, the hunting at destination stops however the error can be quite large in the 0.004-0.005" range.
 
 
Attachments:
		Last edit: 26 Mar 2024 18:24  by slowpoke.			
			Please Log in or Create an account to join the conversation.
- Todd Zuercher
- 
				  
- Away
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 4686
- Thank you received: 1433
			
	
						26 Mar 2024 21:00				#296838
		by Todd Zuercher
	
	
		
			
	
	
			 		
													
	
				Replied by Todd Zuercher on topic PID loop tuning (ringing at destination)			
			
				It is impossible to say for sure if it is backlash or response delays of your position mode servos that is the root cause.  But the end result is the same, a delay in response of the motor to changes in the command from Linuxcnc.
Halscope plots of the commanded velocity and and velocity feedback, might be a little more telling, and maybe give us some clue which is the bigger source of the delay. But as long as there is a delay in response, you will never get it much better.
					Halscope plots of the commanded velocity and and velocity feedback, might be a little more telling, and maybe give us some clue which is the bigger source of the delay. But as long as there is a delay in response, you will never get it much better.
		The following user(s) said Thank You: slowpoke 	
			Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5065
			
	
						26 Mar 2024 21:15				#296839
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic PID loop tuning (ringing at destination)			
			
				Any backlash will cause likely hunting of the approximate size of the backlash.
This is not something you can fix with simple PID tuning.
If the instability is because of slow response of the drive (and not backlash),
you can lower the P term and use more integral term.
 			
					This is not something you can fix with simple PID tuning.
If the instability is because of slow response of the drive (and not backlash),
you can lower the P term and use more integral term.
Please Log in or Create an account to join the conversation.
- slowpoke
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 206
- Thank you received: 28
			
	
						26 Mar 2024 21:22		 -  26 Mar 2024 21:39		#296840
		by slowpoke
	
	
		
			
	
	
			 		
													
	
				Replied by slowpoke on topic PID loop tuning (ringing at destination)			
			
				Todd, PCW,
Thanks, that's very helpful, I'm going to swap out the regular bearings for angular contact bearings tomorrow and see where that takes me, but before I do that I want to see what happens with the less P more I approach. Wild guess for I values?
P I
600 ?
300 ?
200 ?
					Thanks, that's very helpful, I'm going to swap out the regular bearings for angular contact bearings tomorrow and see where that takes me, but before I do that I want to see what happens with the less P more I approach. Wild guess for I values?
P I
600 ?
300 ?
200 ?
		Last edit: 26 Mar 2024 21:39  by slowpoke.			
			Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						27 Mar 2024 00:16				#296853
		by andypugh
	
	
		
			
	
	
			 		
													
	
				Replied by andypugh on topic PID loop tuning (ringing at destination)			
			
				I would start with an I of 0.001, then 0.01 and so on until something seems to change.			
					
		The following user(s) said Thank You: slowpoke 	
			Please Log in or Create an account to join the conversation.
		Time to create page: 0.157 seconds	
 
													 
	