The other motor's power gets decreased by A similar but somewhat friendlier calibration program is provided here: Which method works best often depends on how accurate you can measure the error and how much noise random fluctuation there is. Our X-axis horizontal will be our light values just like on the number lines. The proportional range is another very important concept in PIDs.
Uploader: | Yojar |
Date Added: | 27 September 2013 |
File Size: | 62.70 Mb |
Operating Systems: | Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X |
Downloads: | 17102 |
Price: | Free* [*Free Regsitration Required] |
NXT Programming, Lesson 4
At the right is a simplified drawing of a top view of the robot with all the details we need. Kine simplicity I'll assume that the offset has already been measured and stored in a variable called offset. The only way for the integral to move towards zero is to get a string of negative error s to counter balance the earlier string of positive error s to "wind down" the integral.
We would just read a timer each time we read the light sensor. We could define the ipd as how fast we are moving towards or away from the lines edge. There are two ways to calibrate the light sensor: The light sensor is placed between the front "skis" and near the place where the skis contact the surface, so that the skis will push down lightly and smooth out any large wrinkles in the mat under the light sensor, to help it ofllower a consistent reading.
Various K s show up all over the PID prohram and are a very important. You use K to convert a number that means one thing light values or error in our case into something else like a turn.
That's hardly "precision engineering" but it works well enough so we'll call it "practical engineering". We will use a Tp target power of 50, when the error is zero both motors will run at power level First, pgogram will shift the center of our light number line the X-axis to zero. The rest of the robot is the large ndt with an arrow, the arrow shows the normal direction of travel. Remove this after debug.
NXT Line Follower
The new Ki is different from liine original but since we don't know either one it doesn't really matter which one we use or what we call it. It then uses those values to calculate the offset. Just as with the proportional and integral terms we have to multiply by a constant. I'll just make one small change by including the loop time dT in the calculations shown in the table below. The integral is the cumulative history of the error and gives the controller a method to fix errors that persist for a long time.
Page 1 of 1. It looks OK on a straight line with with the motors programmed for gentle turns.
It uses sensor to gather information about the world around it and changes it's behavior depending upon that information. What would a "proportional" strategy look like for two light sensors? It just means it is offset to one side or the other by a small amount. This approach can be made to work but it is not very followfr or accurate and looks terrible. If it is expected that Kp might be near 1 then a value of as the multiplier would be a good bet. The NXT will collower adjust the numbers reported by the light sensor so that the minimum value expected will be reported as 0 and the maximum as We'll guess that we want the power to go from 50 to 0 when the error goes from 0 to The LineFollowPro program includes two variables, Power and Gain, written right at the beginning, that are adjustable.
The constant is the offset value the average of white and black light sensor readings. The "Overshoot" is how far past the line edge the robot tends to go as it is responding to an error.
Line Follower Sensor for NXT or EV3
You need a "black" and a "white" value. The LineFollow5 program uses a somewhat more complex "Five State" method of following the line with the goal of going straighter and smoother and therefore faster.
The LineFollowPro program uses a "Proportional" line following strategy, which involves several math calculations to flolower an amount of steering correction that is proportional to the distance off of the desired path the right edge of the line that the robot thinks it is.
I'll just say that gentle turns work well for a fairly straight line. The gray "skis" which are on the front on the robot allow the robot to slide from side to side so that it can turn accurately. The expected range of values that Kp might be libe on exactly what the P controller is doing.
No comments:
Post a Comment