Line Follower Help (car steering - not skid steering) w/ PID
Posted: 28 Apr 2011, 22:11
Hello all,
First of all I appreciate all the possible help! This is a very important thing for me.
I'm designing a car with front wheel steering and trying to use a PID controller to follow a line edge.
Besides being my first time doing a PID, I know the basics, but I'm into troubles to get something satisfactory. I'm afraid that it has also a lot to do with the building configuration of the steering.
Now some details.
Pictures of the car and steering:
- http://dl.dropbox.com/u/2616967/CIMG1874.JPG
- http://dl.dropbox.com/u/2616967/CIMG1875.JPG
- http://dl.dropbox.com/u/2616967/CIMG1876.JPG
The best I can achieve at the moment is to follow a straight line in a slow velocity and with veeery wide curves. I have to keep the Proportional part very low not to cross the line to the opposite side. But with the Proportional constant low I can't follow a narrow curve. Even if I increase the Integral constant, to get effect over relatively narrow curves, it will oscillate a lot(!!) and very easily cross the line in straight lines.
In the meanwhile, I'm ignoring the D part, because I can't get fast responses enough from the steering to get any valuable work from Differential part.
I'm doing it in NXC, with the new position regulation functions. The regulation time was lowered to 10ms, but it doesn't help. The PID steps are around every 10ms.
I have some guesses (and almost certainties) about some of reasons of this issues. But I would like to get opinions from you. Here they are:
- when we apply a decision of whether to turn right or left, the response is never immediate. An example: if the wheels are turned to the left and the NXT senses the line, the controller decides to go right to get out of the line. Then it will take time to get the wheels actually turned to the right. During the time the wheels are turning, the sensor already crossed the line, or.. went much further into the line. This case is never an issue with skid steering: once you apply different velocities, you are already compensating the error. I think this is the biggest issue!;
- The color sensor is too far from the steering wheels;
- The pivot point of the steering of each wheel is not in the centre of the wheel, which makes the car moving while turning, describing a curve that actually goes against the correction of the error.
Of course, this steering solution is not helping, but I'm quite restricted to use it. I would like to know from you if you think that the configuration maybe a big issue or if you think it should still work quite good. I don't even find anything similar on the net (line follower with front wheels steering).
Appreciate all your attention and thanks in advance!
Kind regards,
Ricardo
First of all I appreciate all the possible help! This is a very important thing for me.
I'm designing a car with front wheel steering and trying to use a PID controller to follow a line edge.
Besides being my first time doing a PID, I know the basics, but I'm into troubles to get something satisfactory. I'm afraid that it has also a lot to do with the building configuration of the steering.
Now some details.
Pictures of the car and steering:
- http://dl.dropbox.com/u/2616967/CIMG1874.JPG
- http://dl.dropbox.com/u/2616967/CIMG1875.JPG
- http://dl.dropbox.com/u/2616967/CIMG1876.JPG
The best I can achieve at the moment is to follow a straight line in a slow velocity and with veeery wide curves. I have to keep the Proportional part very low not to cross the line to the opposite side. But with the Proportional constant low I can't follow a narrow curve. Even if I increase the Integral constant, to get effect over relatively narrow curves, it will oscillate a lot(!!) and very easily cross the line in straight lines.
In the meanwhile, I'm ignoring the D part, because I can't get fast responses enough from the steering to get any valuable work from Differential part.
I'm doing it in NXC, with the new position regulation functions. The regulation time was lowered to 10ms, but it doesn't help. The PID steps are around every 10ms.
I have some guesses (and almost certainties) about some of reasons of this issues. But I would like to get opinions from you. Here they are:
- when we apply a decision of whether to turn right or left, the response is never immediate. An example: if the wheels are turned to the left and the NXT senses the line, the controller decides to go right to get out of the line. Then it will take time to get the wheels actually turned to the right. During the time the wheels are turning, the sensor already crossed the line, or.. went much further into the line. This case is never an issue with skid steering: once you apply different velocities, you are already compensating the error. I think this is the biggest issue!;
- The color sensor is too far from the steering wheels;
- The pivot point of the steering of each wheel is not in the centre of the wheel, which makes the car moving while turning, describing a curve that actually goes against the correction of the error.
Of course, this steering solution is not helping, but I'm quite restricted to use it. I would like to know from you if you think that the configuration maybe a big issue or if you think it should still work quite good. I don't even find anything similar on the net (line follower with front wheels steering).
Appreciate all your attention and thanks in advance!
Kind regards,
Ricardo