PID Balance+Ball | full explanation & tuning

Sdílet
Vložit
  • čas přidán 20. 06. 2024
  • $2 for 5PCBs (Any solder mask colour): jlcpcb.com
    See each step for the P, the I and D action. See how each of the variables will change the output and finally get the ball stablea and stop it in the middle of the balance. Theory + example of PID tunning.
    Help my projects on Patreon : / electronoobs
    my Q&A page: electronoobs.com/eng_preguntas...
    Facebook page: / electronoobs
    Canal en Español: / electronoobs en español
    LINKS
    -------------------------------------
    Tutorial website :electronoobs.com/eng_arduino_t...
    Schematic: electronoobs.com/eng_arduino_t...
    Code: electronoobs.com/eng_arduino_t...
    3D files: electronoobs.com/eng_arduino_t...
    PART LIST
    -------------------------------------
    Arduino nano: rover.ebay.com/rover/1/711-53...
    Sharp 2y0a21 sensor: rover.ebay.com/rover/1/711-53...
    Futaba S3003 servo: rover.ebay.com/rover/1/711-53...
    🔬PRINTERS FDM
    -------------------------------------
    Artillery Sidewinderr X1 (364€ Aliexpress): s.click.aliexpress.com/e/_9y9haI
    Artillery GENIUS (307€ Aliexpress): s.click.aliexpress.com/e/_A9SvG2
    Creality3D Ender 3 Pro (230€ Aliexpress): s.click.aliexpress.com/e/_APcCa2
    Anycubic Mega S (206€ Aliexpress): s.click.aliexpress.com/e/_ALcTLs
    ELEGOO NEPTUNE 2 (186€ Aliexpress): s.click.aliexpress.com/e/_AM2y7c
    Prusa i3 MK3S Clone (393€ Aliexpress): s.click.aliexpress.com/e/_ASNXyi
    Creality CR-10 V3 (480€ Aliexpress): s.click.aliexpress.com/e/_AnycCO
    🔅PRINTERS RESIN
    -------------------------------------
    ELEGOO Mars Pro (208€ Aliexpress): s.click.aliexpress.com/e/_A0nVFY
    ELEGOO Saturn MSLA (480€ Aliexpress): s.click.aliexpress.com/e/_AKxJim
    Anycubic Photon Mono (199€ Aliexpress): s.click.aliexpress.com/e/_9ulv4K
    Creality HALOT ONE (275€ Aliexpress): s.click.aliexpress.com/e/_Ak7jBC
    Like share and subscribe to motivate me. Thank you
    #PID
    #balance
    #servo
  • Věda a technologie

Komentáře • 646

  • @ELECTRONOOBS
    @ELECTRONOOBS  Před 5 lety +20

    Follow me on FACEBOOK for more: facebook.com/Electronoobs
    help me on Patreon: www.patreon.com/ELECTRONOOBS

    • @ahmdabdallah2132
      @ahmdabdallah2132 Před 4 lety +1

      Electronoobs 🔴 What Is Islam? ⚠️
      🔴 Islam is not just another religion.
      🔵 It is the same message preached by Moses, Jesus and Abraham.
      🔴 Islam literally means ‘submission to God’ and it teaches us to have a direct relationship with God.
      🔵 It reminds us that since God created us, no one should be worshipped except God alone.
      🔴 It also teaches that God is nothing like a human being or like anything that we can imagine.
      🌍 The concept of God is summarized in the Quran as:
      📖 { “Say, He is God, the One. God, the Absolute. He does not give birth, nor was He born, and there is nothing like Him.”} (Quran 112:1-4)[4] 📚
      🔴 Becoming a Muslim is not turning your back to Jesus.
      🔵 Rather it’s going back to the original teachings of Jesus and obeying him.

    • @martinmoraga2220
      @martinmoraga2220 Před 4 lety

      puedes ponerle subtitulos porfavor.

    • @brunsniggel
      @brunsniggel Před 4 lety +2

      Did you try reading a couple of distance measurments and f.ex averaging the result? Might be able to smooth out the noise from the sensor

    • @KeithOlson
      @KeithOlson Před 4 lety +1

      ​@@ahmdabdallah2132 ...except Allah is NOT Yahweh--they follow two COMPLETELY different ideas of justice, for example--nor did Jesus teach what Mohammed did; quite the opposite, in fact. For example, Jesus allowed Himself to be killed for His beliefs, while Mohammed killed others for his. (I won't reply further, as the original post was religious spam, but lies must not be allowed to stand unprotested.)

    • @featherbrain7147
      @featherbrain7147 Před 4 lety

      I like the fact your code does not use a library, so the computation is easily visible.

  • @johnschmidt874
    @johnschmidt874 Před 5 lety +363

    I think it's the best explanations of PID control concept i've ever had. It didn't dive into mathematical model, but it gave concept of how PID works. It's good if you make another video on how to apply filters on the system.
    Thanks for making this awesome video mate.
    Edit: you've got a new subscriber here.

    • @Evgen-Evgen-Evgen
      @Evgen-Evgen-Evgen Před 4 lety +2

      Yeah

    • @MrScorpnok
      @MrScorpnok Před 4 lety +4

      This controller uses the ideal formula for D i think. If the setpoint is changed from a value to another (or the measured value...)in this case if the ball is moved from one point to another, the difference between measure and setpoint will instantly change and so the D will jump up to infinite for a moment (error-previousError/TIME)... In reality a filtration constant is needed. The shaking in this is probably is due to te inaccuracy of the measuring device (the measurement value jumps in steps instead of smooth rise/lowering) for that you'll need the filtration timeconstant, which will limit the jump of the D-control. Don't really know how to explain better without bringing laplace-functions to the table... Laplace functions are imo the easiest way to show the principle but i'd have to explain how they work...

    • @MrScorpnok
      @MrScorpnok Před 4 lety +4

      So, lets assume the system in this video checks the balls position every 1 ms and the accuracy of the measurement is 5mm. If the ball moves really slow, lets say it is 20mm away... it can move a few mm (to 22mm) before the measurement device reacts, and when it reacts (at 23mm), it'll think it has moved to 25mm. Now that the last measurement before the change was 1ms ago, the derivate part calculates 5mm/1ms, even tho the ball would be just barely rolling. The speed calculated with these values ends up being 5m/s. This makes the excessive back-n-forth movement. I think you might have already figured out why the filtration is needed but anyways... I was bored so I explained anyways :D also this didn't help at all with what you were asking which was HOW to make the filtration XD

    • @MrScorpnok
      @MrScorpnok Před 4 lety +5

      Elimination of derivative kick is a good term to google

    • @akkudakkupl
      @akkudakkupl Před 4 lety +1

      @@MrScorpnok You can also just get rid of the D term if you are okay with a bit of overshoot. Most real life process automation just ditches the D term because it has destabilizing properties :D

  • @uatiger1
    @uatiger1 Před 3 lety +10

    Very Thankful to you brother. I am an Electrical Engineering graduate and I have studied Control Systems extensively in my degree. I studied the mathematics of PID controllers in excruciating detail. And never fully understood it and could never apply it in practice until I watched this video of yours. Hats off man.

  • @bogdanmarinescu78
    @bogdanmarinescu78 Před 4 lety +6

    I've read quite a few PID tutorials in the past and they helped me understand how PID works, but this is still by far the best explanation of PID that I've ever seen, and now I understand PID even better. Thanks and keep up the good work!

  • @WillHenson2009
    @WillHenson2009 Před 4 lety +13

    One of the best practical demonstrations of PID I've ever seen, fantastic!

  • @miiroderrick8821
    @miiroderrick8821 Před 4 lety +1

    Was researching about PID temperature controller, I found my self on your video, then I wanted to get more explanation on PID control systems, CZcams brought me here surprised you're the same person to offer both my interests and I don't need any extra video. Honestly, you're the best I have ever seen in electronics.
    Thanks for the simple and creative illustrations.

  • @robbgosset674
    @robbgosset674 Před 3 lety

    This is by far one of the best explanations of how PID control works. Clear, concise and covers all the encessary information. Thanks for making this video!

  • @ranashreyas
    @ranashreyas Před 4 lety +6

    This was such an amazing explanation, mostly because you used a physical model and tested it; no other tutorial has actually implemented it. Thank you!

  • @cuturbs
    @cuturbs Před 4 lety +14

    I usually don't leave a comment on videos, but man, this one is gold. I'm an almost graduaded eletrical engineer and I took control classes. They were full of math and theory and lacked pratical exemples and your explanation is flawless. Just earned a new subscriber. Keep up this excelent work!

  • @donstillwell9894
    @donstillwell9894 Před 4 lety +1

    Excellent demonstration of PID control. We are going to build your PID project to use in our maintenance training, where I work, to hopefully give our maintenance team members a better understanding of how a PID control work and how to tune a PID loop. Thank you very much for taking the time to make the video and sharing it with us!!

  • @final0915
    @final0915 Před 3 lety +3

    it’s 2:39am in the UK and I need to get up at 6:30am. This has made my day already! thank you so much for putting this together.

  • @mmdnaderi7183
    @mmdnaderi7183 Před 5 lety +129

    best explanation ever ! thank you again

  • @clairecelestin8437
    @clairecelestin8437 Před 7 měsíci +2

    Seeing the behavior of each component in a real system made it absolutely clear what each expression does, and how they work together to hold the system at a specific value. This was a really great demonstration.

  • @harshdesai1932
    @harshdesai1932 Před 5 lety +5

    You Explained this in best way than any youtuber can explain. You have cleared my so many doubts. You are a genius. Keep Spreading knowledge. I really really appriciate you man.

  • @defenestrated23
    @defenestrated23 Před 4 lety +20

    Heckin' fantastic. I've spent countless hours on PID theory and programming. This is hands-down the best example I've seen. Insta-subscribed.

  • @edgeeffect
    @edgeeffect Před 5 lety +4

    I've read about the theory several times without fully understanding but this simplified experiment makes it all very clear..... great stuff.

    •  Před 4 lety

      I know right! I totally agree.

  • @RafaelKarosuo
    @RafaelKarosuo Před 3 lety

    As many other have said, this 14 minutes helped understand the PID control implementation in code, way better than a semester of my automation and control introduction. Thanks

  • @ravindrasarak2007
    @ravindrasarak2007 Před 4 lety +3

    PID was always a tough topic to visualise but your demonstration made it really easy.
    Thank you so much.

  • @muqarrab8736
    @muqarrab8736 Před 5 lety +4

    That explanation was really good, a noob as well as a professional could understand what you were saying. Subscribed

  • @ConsultingjoeOnline
    @ConsultingjoeOnline Před 5 lety +2

    Awesome tutorial. I do hvac programming and I write pids for temp control. This is a great video for understanding the P, I and D. Keep it up.

  • @brandonmartin7779
    @brandonmartin7779 Před 3 lety

    This is hands down the best illustration of PID control I've seen! Great work!

  • @nieldewet5315
    @nieldewet5315 Před 4 lety +3

    What a brilliant and intuitive explanation. No lecturer of mine could ever explain it like this.

  • @johnstilwell9462
    @johnstilwell9462 Před 3 lety

    One of the clearest presentations of PID control I've seen yet. Thanks!

  • @jiangxu3895
    @jiangxu3895 Před 4 lety

    Best PID explanations. I’ve gone through many tutorials, none of them explained well to show the importance of each parameter. It is especially difficult for me to understand the integrate of distance, when the differentiation of distance is equal to speed, which is much easier to understand. Anyway, great video. Keep up!

  • @theflyingdutchman787
    @theflyingdutchman787 Před 4 lety +1

    The best PID explanation I’ve found on the internet! Well done.

  • @kenlipper874
    @kenlipper874 Před 4 lety +1

    Thanks for that - really cool! I've been trying to get a grasp on PIDs as applied to my racing quadcopters. Your excellent experiment and explanation really helped.

  • @77Chester77
    @77Chester77 Před 3 lety

    This was my first video in the field of controllers and now I feel that I already have a rough idea what P-, I- and D-Values do.
    Thank you very much!

  • @Amir-kz6yq
    @Amir-kz6yq Před 5 lety +50

    I see you have paid attention at your control systems' lectures

  • @eritronc
    @eritronc Před 4 lety

    I hope i was told the PID system that way at the university! In 13 minutes i learn what i couldn't on 7 years! Your application is so clear. Thank you!!

  • @Mustafff76
    @Mustafff76 Před 4 lety +2

    I've never understood PID well enough, until now :D Thank You!

  • @Barxxo
    @Barxxo Před 3 lety +1

    One of the best PID- explanation i found so far. Thank you.

  • @kun_fu_taco4775
    @kun_fu_taco4775 Před 3 lety

    You are a life saver my friend! We have a system that control volumetric flow and we are trying to keep the flow rate steady at very low flows, this is all controlled by a PID system and I had a hard time understanding how to input the values. This really helps! "If the error is too small, the proportional won't affect" This seems true because we have a harder time controlling the lowest flows which is probably not being detected by the system.

  • @quantomic1106
    @quantomic1106 Před 4 lety +1

    Best PID demo I've seen. Keep up the good work bud!

  • @ShopperPlug
    @ShopperPlug Před rokem

    This is really a cool PID example, like the fact it is using a LIDAR. This is the best explanation of PID and how it works.

  • @PhilippeCarphin
    @PhilippeCarphin Před 8 měsíci

    I spent at least an hour last week trying to find a video on PID control for my friend and none of them including the one I selected were as good as this so I'm gonna send him this one immediately.

  •  Před 4 lety +1

    Awesome channel! One of the best practical explanations of PID control I've seen!

  • @chaussebenjamin
    @chaussebenjamin Před 3 lety +1

    This is the best PID explanation I have seen so far! Thank you!!!

  • @wikrap1
    @wikrap1 Před 4 lety +1

    You actually closed half year of lectures on my studies in 3 minutes... :D Very practical approach.

  • @albrosTeam
    @albrosTeam Před 5 lety

    I found this video very clear to demonstrate the PID concept and the isolated effect of each feedback component. Thank you for sharing

  • @durandile
    @durandile Před 5 lety +1

    Thank you, I love all your videos, I think you're the best CZcamsr in your field of projects!

  • @OsoPolarClone
    @OsoPolarClone Před 5 lety

    A fantastic educational video that explains and demonstrates EACH PART of the equation and how each contributes to the solution. Well done!

  • @lucasmatsuoca
    @lucasmatsuoca Před měsícem

    Thank you very much, this was one of the videos that helped me to, finally today, develop my PID controll for BALL & PLATE. You have no idea on how much you helped me. Thank you!

  • @mibrahim4245
    @mibrahim4245 Před 3 lety +2

    if you explain it simply, you understand it !!
    YOU'RE AWESOME explaining the PID parts ..
    - Mechatronics engineer

  • @dkryptonut
    @dkryptonut Před 4 lety

    Been trying to understand this for a while, thanks for simplifying the explanation, it really helped. You've gained a subscriber.

  • @AYPAK
    @AYPAK Před 3 lety

    I never had this realization of PID controller. Really appreciate the effort you put in this video

  • @IncroyablesExperiences
    @IncroyablesExperiences Před 5 lety +74

    Great, when you really understand these things you always want to go further, not as a teacher that thinks he understood.

    • @RiteshNEVERUNIFORM
      @RiteshNEVERUNIFORM Před 3 lety +2

      I really needed that

    • @ramonmorales4937
      @ramonmorales4937 Před 3 lety +3

      bruhhh my teacher doesn't want us to understand, he just want to cover the signature, even when he is a doctor in control systems.
      We know how to design a PID in math but not in real plants LOL

    • @justineloi1234
      @justineloi1234 Před 2 lety +3

      Apparemment je ne suis pas le seul français ici !

  • @baijalashok
    @baijalashok Před 4 lety

    Wow! How clearly you have explained PID. Great.

  • @strydomobile
    @strydomobile Před 4 lety

    One of the best explanations I've seen. Well done.

  • @MrAlFuture
    @MrAlFuture Před 5 lety +1

    This is an excellent demo of a PID controller. Thank you!

  • @hoxorious
    @hoxorious Před 5 lety +1

    I finally learnt how PID control works. Thanks alot! ❤

  • @MABdrone
    @MABdrone Před 3 lety +1

    Very nice! The quadcopter pilots always struggle with PID concepts, I think this can help a lot!

  • @ezion67
    @ezion67 Před 5 lety

    This is about the best demo of how PID control works ever.

  • @subirbhaduri
    @subirbhaduri Před rokem

    Amazing. I think I will make a replica for my introductory calculus class! Thank you for being so creative and generous.

  • @jonathandufault2099
    @jonathandufault2099 Před 3 lety

    This is an incredibly well put together video and it's such a good explanation!

  • @hugbearsx4
    @hugbearsx4 Před 4 lety +44

    Great! So now it's time for a video on PID tuning, right? That is, finding the optimal values for p, i and d parameters.

  • @worldvision8645
    @worldvision8645 Před 3 lety

    We love your channel and you inspire us to start our own channel about control theory, system identification and computational intelligence. Love your videos!

  • @Leafyfpv
    @Leafyfpv Před 4 lety +1

    I havent watched this through yet but can tell its a great instructional video... Also
    That circuitboard background is SICK!!!!!

  • @Kaxlon
    @Kaxlon Před 4 lety +3

    Best PID video on CZcams!
    Thanks! =)

  • @markmaker2488
    @markmaker2488 Před 4 lety

    Thank you, I must agree that this is the best example and explanation of PID ever.

  • @electronics.unmessed
    @electronics.unmessed Před 6 měsíci +1

    Nice PID control demonstration. Thanks!

  • @philkennedy342
    @philkennedy342 Před 4 lety

    Thanks for the share a nice intuitive way of explaining pids something I've not fully understood till now....

  • @gildedbear5355
    @gildedbear5355 Před 3 lety +1

    Never had issues understanding the P or D part, but I was always a mystery. THANK YOU!

  • @sheepman6291
    @sheepman6291 Před 4 lety

    This is sick thank you. It was really cool to look at all the variables visually.

  • @brandonmeyer2922
    @brandonmeyer2922 Před 4 lety +3

    Absolutely love this clear, concise, simple explanation!! Been watching your videos for a while now and love them all. Keep up the great work!!

  • @JamesFraley
    @JamesFraley Před 6 měsíci

    Amazing videos with the best PID explanation I've seen.

  • @te9781
    @te9781 Před rokem

    Best PID explanation I ever watched. THANK YOU

  • @surajmate8047
    @surajmate8047 Před 4 lety

    thanks sir
    I think it's the best explanations of PID control concept i've ever had.
    please keep teaching and helping us thank you so much
    im from india and im big fan of your electronics projects
    again thanks

  • @GuyFromJupiter
    @GuyFromJupiter Před rokem +7

    Higher gain values make for a faster reacting system, but they also tend to make the system very unstable if raised too high. This is especially true in systems with a considerable amount of dead time, which is the time from the PID changes its output to when there is a response from the system as measured by the sensor. This is why PID controls always have to be tuned for an optimal balance of performance and stability.

  • @francoisguyot9770
    @francoisguyot9770 Před rokem

    That was very gratifying! I loved the balancing ball idea.

  • @babdie
    @babdie Před 5 lety

    For the first time understood ,what actually is PID , great application and good video man

  • @cymeriandesigns
    @cymeriandesigns Před 5 lety +2

    This was a great demonstration of what each of the P I and D factors are for, and how they individually influence the final result. I found myself wondering whether averaging multiple sensor values would reduce the jitter. Anyway, thank you for making this.

  • @thesimonien
    @thesimonien Před 3 lety +1

    Best pid explanation i ever got, thank you !

  • @saketanand44
    @saketanand44 Před 3 lety

    really amazed to see practical aspect of whatever we study theoretically...Thanks

  • @stevelee7843
    @stevelee7843 Před rokem

    One of the best demonstration of PID! kudos 👏🏻

  • @damiangames1204
    @damiangames1204 Před měsícem

    taking a control course at uni now. this helps a lot with getting the feel of what each does very nicely!

  • @heitorc122
    @heitorc122 Před 4 lety

    Really good explanation of PID !! Hope you keep doing this great job ! Thank you for it

  • @abhiramghanta9060
    @abhiramghanta9060 Před 5 měsíci +1

    this is one of the best examples that clicked for me

  • @nilobortolotti7065
    @nilobortolotti7065 Před 4 lety

    Excellent video and great explanation of PID control.

  • @Migueldeservantes
    @Migueldeservantes Před 4 lety +1

    You have a great channel! I'm impressed.. you did an awesome job sir!

  • @user-mc1rq4pw1o
    @user-mc1rq4pw1o Před 2 měsíci

    This video clearly explains the PID, studying each of the P, I, and D separately made me get it finally.

  • @charmingali34
    @charmingali34 Před 3 lety +2

    Very nice 👌 I don't work with PID but you remind of past times when we studied Controls.

  • @SecurityDivision
    @SecurityDivision Před 4 lety +1

    Damn probably the best demonstration! And also it explains the meaning of the formulas.

  • @siddharthmali5841
    @siddharthmali5841 Před 5 lety

    Really great explanation of PID controller. Thank you😀✌️

  • @Green__Man
    @Green__Man Před rokem

    Damn dude you're the fifth video I've watched on this subject today but the first to actually make sense 🔥

  • @Arthur-rh9tf
    @Arthur-rh9tf Před 4 lety

    Wow probably the best explaination of pid controllers. Thank you good sir

  • @tunahankaratay1523
    @tunahankaratay1523 Před 5 lety +1

    Best PID video I've ever seen!

  • @mehmetkayhan2465
    @mehmetkayhan2465 Před rokem

    Congrats for your great effort. It's the best explanations of PID Control ever I 've seen. Thanks a lot.

  • @manickn6819
    @manickn6819 Před 5 lety

    Great explanation. I am sure this will be useful to many. Thanks for investing the time.

  • @aaronchu0427
    @aaronchu0427 Před 3 lety

    Thank you sharing. Love your projects. They are all great fun and great for learning at the same time.

  • @Thunderchops1984
    @Thunderchops1984 Před 7 měsíci

    Great video. Studied this at uni and this explains the terms practically and very clearly. Nice one. 👍

  • @PCRduino
    @PCRduino Před rokem

    Nice example! Simple and clear. Thank you!

  • @MrJordot7
    @MrJordot7 Před 4 lety +1

    I work with PID control quite often yet this is the best way I've heard it explained!
    Fancy doing a slight development of the same experiment, but put a fan at one end that you can direct towards/away from the ball to model an outside influence? When you use a PID for cooling, the temperature of the coolant can change, which means your actuator may need to start providing 'more' even though it was at equilibrium.

  • @anavartpandya7626
    @anavartpandya7626 Před rokem

    This was exactly what I was looking for. Great video🙌🙌

  • @asyraafmdnor3273
    @asyraafmdnor3273 Před 4 lety

    Thanks mate..The best explanations for PID control concept

  • @JimK0QJC
    @JimK0QJC Před 3 lety

    Excellent demonstration. I will use this with students. Thanks you

  • @user-cs2cn9ft3e
    @user-cs2cn9ft3e Před 4 lety +1

    You are a good teacher, bro! Thank you!

  • @TexanMonkey
    @TexanMonkey Před 7 měsíci

    Very good video! It really helped my robotics students understand PID controls!

  • @maplobats
    @maplobats Před 4 lety

    A brilliant way to explain PID!

  • @martinhlupik1922
    @martinhlupik1922 Před 4 lety

    Graat job. Very nice explanation of PID regulation. Thank you.

  • @alvinmendoza7559
    @alvinmendoza7559 Před 4 lety

    Thank you for very clear explanation about PID!