|
Page 1 of 1
|
[ 3 posts ] |
|
Lurch on Speed Change while turning using PID control
| Author |
Message |
|
david fort
Rookie
Joined: Sun Nov 16, 2008 3:07 pm Posts: 45
|
 Lurch on Speed Change while turning using PID control
We are having a problem with a Lurch or Glitch while changing the speed during a turn.
For example, we are turning a tank-style robot with a command like
motor[motorD] = 50; motor[motorE] = -50;
Then when we get close to the target heading, we are slowing down:
motor[motorD] = 10; motor[motorE] = -10;
At the transition between the speeds, the robot will sometimes move straight forward or maybe straight backward for an inch or 2.
This seems to not happen if PID control if Off, so I am thinking maybe it has to do with accumulated error in the PID control or something like that. But that is total guess on my part. My gut feel is that the error accumulated on each side should be about the same and in opposite directions, so it surprises me that the result is a lurch forward, not just a bump in the rotation speed.
Anyone have any thoughts on this? Similar experiences?
And is there a way to peek at what is going on inside the PID algorithm?
For example: What is the current error? What is the current commanded output to the motor? If in the Ramp Profile, what is the current target speed? What are the gain values?
Thanks in advance, David Fort Rockwell Automation Team 1001 Charles F. Brush High School
[Edit update] I notice I can get this to happen just using the "NXT Device Control Display" dialog with the robot up on blocks. If I check the Reg checkbox, then set Speed on motorD to 50, then change to 10 then 50, etc., it will sometimes reverse direction. There might be a correlation with resisting force, not sure.
|
| Tue Dec 23, 2008 5:42 pm |
|
 |
|
Jeff McBride
Professor
Joined: Fri Sep 19, 2008 1:22 am Posts: 200
|
 Re: Lurch on Speed Change while turning using PID control
Do you have shaft encoders installed on your motors and plugged into the motor controller? PID control doesn't work if you do not have the shaft encoders installed.
_________________ Jeff McBride Benson Robotics Club
|
| Wed Dec 24, 2008 1:04 pm |
|
 |
|
david fort
Rookie
Joined: Sun Nov 16, 2008 3:07 pm Posts: 45
|
 Re: Lurch on Speed Change while turning using PID control
yes. We seem to be getting good results with the PID except during these speed changes.
|
| Wed Dec 24, 2008 2:34 pm |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|