PID Line Follower for EV3 (Part 2) - K Values and How to Improve Performance

  Рет қаралды 30,446

Builderdude35

Builderdude35

Күн бұрын

The PID line follower is the ultimate EV3 line following program. It is mathematically complex, but it can compensate for a lot of errors and keep your robot right on track. It is a popular line follower to use in FLL or WRO. Previously, I taught you how to program a PID line follower. Today, I will demonstrate the line follower in action with my robot, Sirius, provide some sample K values you can try with your own EV3 robot, and discuss ways to make it more accurate and reliable. I will also discuss the practicality of using a PID line follower in an FLL or WRO competition.
My Patreon supporters for more than $5 for the month of August were: Stephen Rozmiarek and Turnabout Akamia. Thank you very much!
My supporters on Patreon contribute additional funding that allow me to build up and improve this channel and to make more videos. If you would like to help, you can support me here: / builderdude35
Special thanks to my friend Preston Nichols for designing Builderdude35's awesome new introduction and logo!
My Website: builderdude35.com/
Builderdude35 KZbin: / @builderdude35
EV3 PID Line Follower: • PID Line Follower for ...

Пікірлер: 48
@antoniopola542
@antoniopola542 3 жыл бұрын
Very professional by a teenager: congratulations!
@pspeth
@pspeth 6 жыл бұрын
I would suggest testing and showing the performance of your line follower in different situations. Straight, wide curves and sharp curves, also curves in multiple directions.
@Builderdude35
@Builderdude35 6 жыл бұрын
Thanks for the suggestion! I will make an expanded demonstration video when I get the chance.
@vivangupta4928
@vivangupta4928 5 жыл бұрын
Have you made it yet, I can't find a video were it did turns?@@Builderdude35
@Builderdude35
@Builderdude35 5 жыл бұрын
@@vivangupta4928 Not yet. Stay tuned.
@aarongriesser7314
@aarongriesser7314 6 жыл бұрын
The kD of my WRO-Robot is a lot higher than the kP and it works perfect. I didn't use the kI.
@austinharris5700
@austinharris5700 5 жыл бұрын
For the people who have their robot spinning in circles when any Ki value is used the fix is to put another write integral variable set to 0 in the loop, It only works if the variable is at the start of the loop or the end. The reason that this fixes it is the integral is getting higher and higher as the program runs and makes the robot go in circles I hope this allows the program to use Ki. :)
@morgangadd4988
@morgangadd4988 5 жыл бұрын
Does work it fixes the problem and makes it even better Thanks
@Builderdude35
@Builderdude35 5 жыл бұрын
The problem is, this effectively removes the integral term; it's just the same as if you had just set the Ki to zero. Then, what you really have is just a PD line follower.
@austinharris5700
@austinharris5700 5 жыл бұрын
@@Builderdude35 ok well it makes a difference for me and Ki at least does some thing beside making the robot spin in circles, you should try it
@christianolivergalopo1189
@christianolivergalopo1189 6 жыл бұрын
Greetings from Philippines! Your videos are awesome it helps our team to prepare for the upcoming competition! Thanks a lot Dude! You always impress me. I am looking forward to see more awesome tutorial videos! I am very curious about your talents and skills, are stuffs about Arduino's beyond your boundaries? Thank you very much!
@Builderdude35
@Builderdude35 6 жыл бұрын
Thanks for taking the time to share some feedback! I have done several projects outside of MINDSTORMS; I have done a few projects with the Raspberry Pi; you can find these videos on my channel. I also just recently made a MIDI controller for my friend, which used an Arduino Leonardo; I don't have a video for it yet.
@bayronpena1037
@bayronpena1037 4 жыл бұрын
How can you do a P or PID control with medium motors, Any recommendations you can give me?
@zilogfan
@zilogfan 7 ай бұрын
put your error values in an array with the index going from 1 to 50 and then starting at 1 again and on and on. Then sum the array for your integral value. Experiment with the number of elements of the array. This gives it a memory for errors recently but not for ever. This is kind of a reset term to clear the integral out of old obsolete data. The number of elements is dependent on how many samples you get from the loop and the ground speed of the robot. You can make it beep every time the array index hits 0 again and then when following the line its memory is the length of travel between beeps... Turn this beep off after you are happy.
@ardagokcek2311
@ardagokcek2311 6 жыл бұрын
Hey builderdude35, my robot can not get the curves and turnes I think you need to make another video and add some extra code blocks for turns and curves.
@divyamarora777
@divyamarora777 5 жыл бұрын
Please add a video for a 2 sensor PID line follower
@Builderdude35
@Builderdude35 5 жыл бұрын
It's coming soon!
@user-mi9xg6yr5s
@user-mi9xg6yr5s 4 жыл бұрын
how do i a stop term? i mean how do i make my robot stop after a N' of cm? (i know how to drive by cm but i dont know how to stop the PID)
@ahsanshahzad500
@ahsanshahzad500 6 жыл бұрын
If we change the colour sensor block to a gyro block and fine tune the K values will it work as a gyro PID?
@Builderdude35
@Builderdude35 6 жыл бұрын
Absolutely! The principles behind gyro following and line (color sensor) following are the same, so you can definitely adapt the code for PID gyro.
@arialindsey1811
@arialindsey1811 6 жыл бұрын
my program will not turn right now. It does a complete 180 when it approaches a 90 degree right turn. How do I fix it
@Builderdude35
@Builderdude35 6 жыл бұрын
I'm not sure. Maybe give the K values a little more fiddling. If that doesn't work, try a different line follower (like 3-sensor) that is easier to adjust.
@johngeorgiades5424
@johngeorgiades5424 6 жыл бұрын
How can I programm my robot to follow the other side of the black line?
@Builderdude35
@Builderdude35 6 жыл бұрын
Simply negate the k values (kp, ki, kd). See my first PID line following video.
@caitlinnguyen8801
@caitlinnguyen8801 4 жыл бұрын
Is this the same concept for a gyro sensor PID program too?
@acutosan7335
@acutosan7335 4 жыл бұрын
yes
@Rxnkshitij
@Rxnkshitij 6 жыл бұрын
Hey Dude, Bro i made this program working perfectly but i wanted to know how to make a program that can tackle gaps in the line or if the PID can tackle this
@Rxnkshitij
@Rxnkshitij 6 жыл бұрын
can you pls tell me how
@Builderdude35
@Builderdude35 6 жыл бұрын
Conveniently enough, I already have a video on the topic: kzbin.info/www/bejne/gonHnmljfNFjjac This will teach you how to go over intersections, but the procedure is the same with a gap; the robot will ignore the empty space and resume when the line is reacquired. This works with every type of line follower.
@Rxnkshitij
@Rxnkshitij 6 жыл бұрын
thnx
@vivangupta4928
@vivangupta4928 5 жыл бұрын
Can the PID Line follower do turns??? I am getting very annoyed at this point
@Builderdude35
@Builderdude35 5 жыл бұрын
PID can certainly do turns. That is generally facilitated by the Kp for gentle turns, and the Ki for very sharp turns.
@robertcameronjones
@robertcameronjones 6 жыл бұрын
Ok. Here's why the integral doesn't work here. This is a highly non-linear control feedback system. Feedback is quasi linear only in a small zone where the sensor can see the edge. Once it drifts off the edge, it has no clue how far away from the edge you are. The error only works up to a point. This makes error cancellation impossible. If you had a gradient gray, you could make use of the integral term.
@Builderdude35
@Builderdude35 6 жыл бұрын
Thank you for sharing! I think you may be on to something. Maybe this is a possible tutorial topic for the future!
@robertcameronjones
@robertcameronjones 6 жыл бұрын
If you do, I'd be interested to contribute. The integral term probably needs a simple high pass filter to "strip off" the long term DC component of the integral anyway. From a control perspective, the integral is probably only relevant for the prior few seconds or so, not from the beginning of time. Even a grayscale line method will likely build up a long term error component due to system tolerance and quantization errors, et. al. I'm a volunteer robotics instructor in Detroit Public Schools for a few years now, and an Electrical Engineer with about 35 year's experience. Thank you for your videos; they are some of the best EV3 videos out there.
@mariosnacouzi8180
@mariosnacouzi8180 6 жыл бұрын
Rob Jones hi can you explain why the integral part doesnt work and what changes to the program would make it work?
@bravesquid6183
@bravesquid6183 6 жыл бұрын
how do you know all this?
@Builderdude35
@Builderdude35 6 жыл бұрын
It's simple... I'm a wizard! ;)
@kathryn9097
@kathryn9097 6 жыл бұрын
I have a couple questions for anyone who can answer them. 1. My robot just turns in circles, how do I fix that? 2. Does this program work with curves and turns?
@Builderdude35
@Builderdude35 6 жыл бұрын
Yes, the program definitely works on all types of curves. If your robot is driving in circles, your robot is either 1) not seeing the line and the color sensor target needs to be adjusted or 2) your k values need adjusting.
@kathryn9097
@kathryn9097 6 жыл бұрын
Builderdude35 Thank you very much! That was very helpful.
@ethanqiu4979
@ethanqiu4979 6 жыл бұрын
I've tried everything I could and it doesn't work. However, I am using gears on my robot. Does that affect the performance?
@Builderdude35
@Builderdude35 6 жыл бұрын
The gears will make the robot's driving more sensitive and possibly harder to adjust as a result. It is mostly in those K values. Keep trying!
@ammesatyajit
@ammesatyajit 6 жыл бұрын
My line follower just turns in circles
@ammesatyajit
@ammesatyajit 6 жыл бұрын
Mine was a port mistake LOL
@dluders
@dluders 6 жыл бұрын
"Integral" and "Derivative" --> Having fun with "Applied Mathematics" ! :)
@Builderdude35
@Builderdude35 6 жыл бұрын
Yes indeed! You can do some awesome things with calculus!
@moiandthebee9779
@moiandthebee9779 4 жыл бұрын
why always ur vid
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 12 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 13 МЛН
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 19 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 151 МЛН
Program your FLL Robot to Acquire the Line for Line Following
7:31
Builderdude35
Рет қаралды 14 М.
Stop Making THIS MISTAKE With Your LEGO Gyro Sensor
10:18
Builderdude35
Рет қаралды 17 М.
I made a SUPER FAST Line Follower Robot Using PID!
10:02
Shyam Ravi
Рет қаралды 295 М.
Proportional Wall Follower for LEGO 51515
11:13
Builderdude35
Рет қаралды 6 М.
The Optimal Color Sensor Placement for EV3 Line Followers
6:38
Builderdude35
Рет қаралды 28 М.
"Mr. Hino's 3 Stategies To Win A SUMO BOT Competition!!"
8:24
LEGORobotics Mr. Hino
Рет қаралды 29 М.
Controlling Self Driving Cars
4:41
AerospaceControlsLab
Рет қаралды 497 М.
Are PID line followers ACTUALLY faster?
6:07
Haase Industries
Рет қаралды 14 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 345 М.