EEVacademy #6 - PID Controllers Explained

Sdílet
Vložit
  • čas přidán 31. 08. 2017
  • David explains PID controllers.
    First part of a mini-series on control theory.
    Forum: www.eevblog.com/forum/blog/eev...
    EEVblog Main Web Site: www.eevblog.com
    The 2nd EEVblog Channel: / eevblog2
    Support the EEVblog through Patreon!
    / eevblog
    Donate With Bitcoin & Other Crypto Currencies!
    www.eevblog.com/crypto-currency/
    EEVblog Amazon Store (Dave gets a cut):
    astore.amazon.com/eevblogstore-20
    T-Shirts: teespring.com/stores/eevblog
    💗 Likecoin - Coins for Likes: likecoin.pro/@eevblog/dil9/hcq3
  • Věda a technologie

Komentáře • 337

  • @MarcoTedaldi
    @MarcoTedaldi Před 6 lety +202

    "control theory, feedback appreciated" 😊😊😂

  • @MartynDavies
    @MartynDavies Před 6 lety +122

    00:17 "any feedback would be appreciated". Aha feedback: control theory. I see what you're doing there ;-)

  • @uzimonkey
    @uzimonkey Před 6 lety +101

    I use PID controllers in a different context: game development. You'll often have a variable you need to drive to a value, but need to do it in a kind of smooth or organic way. Instead of writing a new way to do it every single time I need to do this, I use a PID controller. This is especially useful when other things are trying to effect this value as well, as the PID controller can react and push harder toward the set point and generally won't overshoot the set point.
    It is of course also very useful in physics simulations. I've made a hovercar just by making 4 "thrusters" on the bottom of the car, using the distance to the ground at that location as my setpoint and adding forces at those locations. If I were to try to program something like that, first I think it would take a while, but second I think I would end up with something a lot like a PID controller. They're just useful all over the place in gamedev.
    I also like to think in simplified terms, usually I'm not doing equations and figuring things out exactly in gamedev, it's more of a "put values in until it looks right" kind of task. So imagine a cube that can only move up or down and the PID controller is controlling an upward force against gravity and we want it to hover at a certain height. P is the power, it's responsible for the majority of upward force. D is the damper, it wants to stop all movement, it's responsible for killing oscillations. I is intelligent, it'll make the small adjustments that P and D can't do, namely without I the cube will never quite get to the desired height. This is definitely not engineering, so definitely not an engineer's way of thinking about it but I think it's very useful.

    • @bloodyl_uk
      @bloodyl_uk Před 6 lety +1

      Exactly what I saw in watching this video, cheers.

    • @victornpb
      @victornpb Před 6 lety

      Yeah I used it in software a few times as well.

    • @iamjimgroth
      @iamjimgroth Před 6 lety

      uzimonkey I use this for AI controllers. :)

    • @justinbouchard
      @justinbouchard Před rokem

      i love principles that can be applied to mass amounts of different applications
      absolutely fabulous

  • @TheHuesSciTech
    @TheHuesSciTech Před 6 lety +49

    I think you missed the main point of the D term. If your oven has a lot of thermal mass, *both* the P and the I terms will suffer from overshoot. The D term is very specifically the anti-overshoot term; because it's the only one "smart" enough to see "the oven is below the target temperature, but nevertheless I'm going to vote *against* putting in more effort because it is trending up so fast that I can see it might overshoot soon". On the flip side though, it's refreshing to see a video that doesn't claim/imply that PID controllers are perfect in all scenarios; thank you for mentioning bang-bang controllers.

    • @ramueller11
      @ramueller11 Před 6 lety +14

      That's a good point. To go futher PID terms could be considered the present, past and future terms, respectively.

    • @qcnck2776
      @qcnck2776 Před 6 lety

      ramueller: Thanks, that is a great way to look at it

    • @JRush374
      @JRush374 Před 6 lety +3

      TheHue's SciTech this is what I was thinking too. The D term would take the current position and its derivative and use that to calculate an approximation for a future position. If it's getting close to the set point but is still pushing hard towards that set point, the D term puts on the brakes to help prevent overshoot. Then in the next time step it calculates the approximation again and adjusts accordingly.

  • @Electronicszen
    @Electronicszen Před 6 lety +30

    Very easy to follow, clear and fun explanation of what PID Theory is. Thank you David. Looking forward for the continuation of this topic. Good job!

  • @kevyelyod1211
    @kevyelyod1211 Před 6 lety +37

    I look forward to more control theory videos.

  • @Mr.Newlove
    @Mr.Newlove Před 6 lety +174

    Great video, and contrary to other comments; keep the math or even have more of it. But with some people talking about including electronics, maybe you could have used a small heater element and an Arduino to demonstrate real-time tuning? Or even auto-tuning like many 3d printers use for their heaters.
    In the end a strong foundation in the theory followed by a good practical example of the implimentation is a great way to drive things home.

    • @itzlagana
      @itzlagana Před 6 lety +1

      maybe steal a vid of an inverted double pendulum

    • @qcnck2776
      @qcnck2776 Před 6 lety

      I second that, esp using an Arduino. Great vid, many thanks

    • @wgm-en2gx
      @wgm-en2gx Před 6 lety

      Does anyone know of a good simulator of an over or inverted pendulum in which you could try applying a PID controller to?

    • @wgm-en2gx
      @wgm-en2gx Před 6 lety

      Can you post links in YT comments? This might be a good simulation. robotic-controls.com/static/inverted-pendulum/
      If the link does come through google robotic-controls inverted-pendulum. There is a link in the article for the simulator.

    • @metheone4
      @metheone4 Před 6 lety

      why not?YT=Google and links are not copyright protected,soooo....

  • @pacsmile
    @pacsmile Před 6 lety +13

    What a nice way to explain this, i wish my teachers at college taught me like this, keep up the good work!

  • @adamsfusion
    @adamsfusion Před 6 lety

    This was so cool and so enlightening. I'm just a hobbyist, but I love diving into the work of degreed professionals and seeing what kinds of things they learned in school, and these EEVacademy courses are like a treasure trove of direct info as well as info to look up later.

  • @krgtim
    @krgtim Před 6 lety +1

    I hesitated to click on this video because I usually watch Dave's EEVBlog videos to slowly fall asleep, but now that I have found some time to watch it out of my usual schedule I have to say I really liked it for the educational aspect. Please make more videos like this one! Thanks!
    Oh and nice touch with the picture at the end. That made me actually chuckle a little bit.

  • @Axelios
    @Axelios Před 6 lety +2

    Nice PID video. I thought I already knew everything about PID but you taught me several things I hadn't realized or come across. It was worth the 27 minutes!

  • @maniacalcactus4705
    @maniacalcactus4705 Před 6 lety +87

    Holy crap this is the boring part of the series?!? I can't wait for the rest this was incredibly interesting

    • @ficolas2
      @ficolas2 Před 6 lety +3

      Maniacal Cactus my thoughts exactly

    • @iwtommo
      @iwtommo Před 6 lety +5

      Have a look at "Teaching old motors new tricks" for some real juicy control system nerdiness

    • @y.z.6517
      @y.z.6517 Před 4 lety

      I read this topic before, but this video makes it much easier.

  • @coje4219
    @coje4219 Před 6 lety +2

    Great video, very informative and well done 🤗 looking forward for the rest of the series!

  • @peoplethesedaysberetarded

    Greetings.
    One immediate recommendation: please don't wait until 5 minutes in next time to define your main acronym.
    Common practice is something like this: "Proportional Integral Derivative (PID) Controllers Explained." Right there in the title or title slide. Boom. Done.
    This isn't a slight against you or hate-mail, just a touch-stone to one common recommendation of providing clear technical writing.

  • @jeremyhall7259
    @jeremyhall7259 Před 6 lety

    An actual good video on PID controllers, FINALLY! I have been trying to learn these for years!

  • @colinterry7261
    @colinterry7261 Před 6 lety +3

    Hey! I'm working through my Electrical Engineering degree. I thought this was honestly pretty good. I appreciate the layman explanations of control theory. I am actually taking a controls class soon, so this makes me feel better about that class. There was a bit of rambling and bouncing around, but that's fine. I do that when I explain things to newer students, lol. I also appreciate the math. It's nice to see application, so to speak, rather than just concepts. Keep up the good work! I look forward to more videos on this topic!!!

  • @NilsRohwer
    @NilsRohwer Před 6 lety +1

    Great video, thanks! I first saw them in flight controllers for racing drones. There you have to tune your PID's and see the results immediately! Now I really understand how and why. With the drones the P is the responsiveness of the sticks in relation to the drones movement. You want it as high as possible, the I is the drones ability to hold the angle you set it at while flying, and the D is used to dampen oscillations from too high P, however it does make the drones more sluggish. As you said, D resists change, makes sense. Tuning those quadracopters is an art, a blend of snappy controls and smooth video. I really enjoyed this!

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

    I was like in a total dark room, and now there is a ray of light. Thanks a lot Bro.

  • @lasersimonjohnson
    @lasersimonjohnson Před 6 lety +1

    I spent alot of my career coding PID loops in PLCs.
    Good video David :)

  • @billmoran3812
    @billmoran3812 Před 6 lety

    Excellent! Excellent! Excellent! I learned basic control theory in college over 40 years ago. It was hard to understand just the theory. I've worked with PID controllers ranging from mechanical analog to fully digital controls for the past few decades. The best way to understand tuning is to do it hands on. It gives you a feel for the dynamics of the process and the amount of hysteresis in the loop. I can't wait to see the inverted pendulum project.
    This is incredible content. Well done!

  • @JonathanDFielding
    @JonathanDFielding Před 6 lety

    Thank you! I took control theory in school but this really helped to understand the PID controller much better.

  • @KX36
    @KX36 Před 6 lety

    So refreshing to see something about PID controllers on CZcams that isn't just tuning by guessing random numbers until the steady state looks OK and never checking the step response which always ends up massively overdamped (like orders of magnitude slower than it could have been).

  • @vehasmaa
    @vehasmaa Před 6 lety +1

    Great video and one of most clear explanation of PID control i have seen.

  • @0ADVISOR0
    @0ADVISOR0 Před 6 lety

    Awesome Info about pid loops! I was just tuning my quadcopter and reading about pid's and now you uploaded more Info, cool thx =)

  • @amd64online
    @amd64online Před 6 lety

    Theory was great to follow alongside, looking forward to the practical.

  • @jwilliams8210
    @jwilliams8210 Před 6 lety +1

    David, nice job balancing examples and theory.

  • @samgab
    @samgab Před 6 lety +1

    Thanks for your efforts. It would be cool to see this PID info from the point of view of model quadcopters, as PIDs, and tuning PIDs are a huge thing with getting rc model quadcopters working properly.

  • @Audio_Simon
    @Audio_Simon Před 6 lety

    David2 brilliant video, just the right balance of explanation in each area for me :)
    Looking forward to the physical example.

  • @mrkattm
    @mrkattm Před 6 lety +1

    Nice job, Controls was my elected concentration as an undergrad EE student until they introduced the State Space method at which time I changed to digital and computer design, a choice I regret. I am looking forward to this series, keep up the good work.

  • @avejst
    @avejst Před 6 lety

    Thanks for sharing 😀👍 happy new year to you and Dave

  • @scalcon1
    @scalcon1 Před 6 lety

    Really enjoyed the video, keep up the great work.
    Looking forward for more control videos.

  • @metaforest
    @metaforest Před 6 lety

    Years ago, I developed several user-content 'toys' in Linden Labs' SecondLife that use PID controllers to simulate 3-D tracking behaviors and in one case, a very realistic tire-swing within the environment. It was fun to see this video and revisit my own experience in developing and tuning a PID controller in that context.

  • @16baad
    @16baad Před 6 lety

    Excellent series, Keep it up, I am waiting for more of these EEVacademy videos

  • @lloydrmc
    @lloydrmc Před rokem

    Truly brilliant presentation. Relating the equations/terms to the graphs made it understandable to people like me.

  • @peterdkay
    @peterdkay Před 6 lety

    Excellent presentation that gives you a good "feel" without maths. Look forward to next viseo

  • @johalun
    @johalun Před 6 lety

    Great video, thanks! Looking forward to the next one.

  • @Hasitier
    @Hasitier Před 6 lety

    I like this kind of videos. And you are getting better from video to video. Go on with the great work Dave 2!

  • @joaovoltani5857
    @joaovoltani5857 Před 6 lety +1

    The best video of the series so far, good job David!

  • @cveliz_
    @cveliz_ Před 6 lety +3

    Nice video, very well explained. Thank you David

  • @MkmeOrg
    @MkmeOrg Před 6 lety

    Very well done. Not an easy topic to explain but hugely useful and widely utilized. Few robotics or flight controllers out there not using PID control.

  • @Bl00drav3nz
    @Bl00drav3nz Před 6 lety

    Thanks David, really interesting topic and I'm looking forward to the next video! :D

  • @davidannett3322
    @davidannett3322 Před 6 lety

    You're a fantastic presenter! So detailed and engaging!

  • @fanest_norfar
    @fanest_norfar Před 6 lety

    Just the other day i said to myself that i have to look at theory behind PID again since i need to do some regulation and here u come with this video - just perfect :D.

  • @xanderlander8989
    @xanderlander8989 Před 6 lety

    Really good video! Interested in the inverted pendulum robot design, component selection, and build. Also excited for tuning the little guy. I've watched several people in my university try to build these for fun or for a class, but they never preformed very well.

  • @jcobnl
    @jcobnl Před 6 lety +1

    Great video. I hardly understood how these kind of controllers work, like ambient room temperature controllers or a cruise control system, and how they deal with overshoot. Until now.

  • @Liamtronix
    @Liamtronix Před 6 lety

    Great video! I was just thinking about learning about this and then this vid came out. Perfect timing!

  • @DavidLightman
    @DavidLightman Před 6 lety

    wow that was extremely interesting!, will look more into that, and looking forward for the next one, thank you!.

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

    Thanks, it is a very fresh way to explain the concepts. I am less lost with this explanation I think I am going though a good path

  • @DingoAteMeBaby
    @DingoAteMeBaby Před 2 lety

    Finally a simple PID controller explanation!

  • @bacawaka2813
    @bacawaka2813 Před 6 lety

    Awesome! I've taken a controls course before but I never learned the Ziegler-Nichols method. In fact, we never actually touched tuning other than using a given transfer function and finding the corresponding PID values by using a root locus. The major issue is that you have to get the appropriate model first then convert to a transfer function which is already a lot of math. Then you can finally get the transfer function to find the PID values which, in most cases only gets you in the ballpark of the system response you desire. Even then there is trial and error involved at the end to get it dialed in to that response.

  • @alekseydudko6961
    @alekseydudko6961 Před 6 lety

    Great video! Thanks Dave!

  • @uwezimmermann5427
    @uwezimmermann5427 Před 6 lety +1

    Absolutely a nice video - it started a bit rough, but once David got into the flow, it became very clear and nice to follow. When explaining the I-part, you should perhaps also have shown the actual "temperature" or state of the oven instead of just the error. You could have combined the two in a single graph where you had shown a line for the setpoint and drawn the error between the setpoint and the actual state.
    YES, keep the math, it is necessary here!

  • @davidabineri908
    @davidabineri908 Před 6 lety

    More like this please, perhaps adding an actual device/program to demonstrate the concepts in context. Very good, clear explanations. Thanks!

  • @ZPositive
    @ZPositive Před 6 lety

    Awesome video. I'm stoked to see the pendulum bot take shape! And yes, please keep the math in there.

  • @anishsarkar120
    @anishsarkar120 Před 6 lety

    love the video dave2 as i am studting control engiuneering in uni and you also covered the topic and no mistakes to spot

  • @chromerims
    @chromerims Před rokem

    Valuable, informative and helpful content👍. Thank you.

  • @jb3757
    @jb3757 Před 2 lety

    loved it, simple, clear, and to the point

  • @cosmicmatrix6238
    @cosmicmatrix6238 Před 6 lety

    OMG i'm just a few minutes into this and it's AMAZING good on ya mate

  • @TheBigBigBlues
    @TheBigBigBlues Před 6 lety

    Great video David, well explained.

  • @mysomervda
    @mysomervda Před 3 lety

    I liked this explanation. Good job David.

  • @CaliReef
    @CaliReef Před 6 lety +7

    Loved it, would like to see more of the math, and maybe a demostration implementing the control theory.
    3rd year EE

    • @nukularpictures
      @nukularpictures Před 6 lety

      woot and then you havent had a lecture about that? After 3 years?

    • @CaliReef
      @CaliReef Před 6 lety +1

      nukularpictures taking it next semester actually.

    • @nukularpictures
      @nukularpictures Před 6 lety

      Wow that is late. I had it in the 3rd and 4th semester. But yeah its a really interesting topic, especially with the more advanced controllers and fuzzy control.
      Its a good choice :)

  • @Rost1337
    @Rost1337 Před 6 lety

    Great mix of math and examples! Keep it up.

  • @omar7amdi
    @omar7amdi Před 6 lety

    Thanks and I hope the other parts are better. As a matter of fact you presented more information than the others who talked about PID. PID is vague subject presented by books and many instructors.

  • @AmRadPodcast
    @AmRadPodcast Před 6 lety +1

    Nicely presented.

  • @johnpossum556
    @johnpossum556 Před 6 lety +1

    feedback: Screech your voice like Dave, it throws my thinking off. Seriously, Dave, that was an excellent vid on digital data logic sheets. I went to college for Avionics tech and that was above and beyond. That is the kind of content I really enjoy watching from you. Something that furthers my understanding of a topic I already love.

  • @adithyaa1
    @adithyaa1 Před 6 lety

    Excellent video. Thanks

  • @viodel8032
    @viodel8032 Před rokem

    Many thanks for this amazing video. Best wishes!

  • @dardosordi
    @dardosordi Před 6 lety

    Great Video, David, much better presentation too, you are getting better every time, seems like you were tuning your constants...

  • @alimmi9
    @alimmi9 Před 6 lety

    Thanks alot! I needed exactly this video! Please continue :)

  • @91722854
    @91722854 Před 6 lety +1

    Ever since I learned Control, I see it everywhere, we are all in harmony because of the feedback and control of our systems with Brain OS, mine currently have 1024 bit cpu, 4096 TeraByte of RAM, but need an upgrade to my soft drive

  • @johnsnow5305
    @johnsnow5305 Před 6 lety

    I don't know how this was boring lol. I guess I just like learning, so I found it interesting. I love learning how math works in the 'real world' - I die trying to learn math purely for math's sake. So something like a PID controller is perfect for me - shows how you can use math in the real world to achieve things you want. I'm glad you included the animation at the end - it definitely helps to see the effects of variable changes in real time like that.
    I hope you guys do a tear-down or something of a typical PID controller during this series. I would love to learn how the circuits / components work together to make this math happen.

  • @oliss10
    @oliss10 Před 6 lety +1

    This is my line of work :) Measuring instruments, controllers and process valves :) and PLC's naturally :)

  • @eziosoft
    @eziosoft Před 6 lety +16

    More videos like this please !

  • @tzampini
    @tzampini Před 6 lety

    Excellent explanation of PID control. Thanks.

  • @captdrsam7773
    @captdrsam7773 Před 4 lety

    Thanks.one of the best explanation .I like the way you combine mathematics together with the actual thing. It really make sense to me, better understanding since I am only good at math but not so to relate it with the actual thing. Once again thank you so much for your fantastic effort to teach us. God bless you Sir.

  • @s.campos9682
    @s.campos9682 Před 2 měsíci

    Absolutely great presentation and gace me a further understanding

  • @matheoml
    @matheoml Před 6 lety

    Awesome explanations!

  • @mandomonica
    @mandomonica Před 2 lety

    Best explanation ever! Thank you!

  • @AmyAndrewAdventures
    @AmyAndrewAdventures Před 6 lety

    Thank you!! Excellent video!!

  • @lasersbee
    @lasersbee Před 6 lety

    Love the explanations of PID tuning... Well done Dave#2..
    An electronic/mechanical setup with demonstration would be an added feature.
    Could you possibly put a link in the description to the Animated PID Graph ?

  • @radoslavradoslavov3528

    If I can't get this explanation I can't get any other. Thank you very much!

  • @TripleJ85
    @TripleJ85 Před 6 lety +3

    Nice one David - clear and concise..
    I wish I had resources like this when I was a student - maybe I would have learned more and played less poker :/

  • @Landrew0
    @Landrew0 Před 6 lety

    Excellent explanation, much better than Dave, who can make the simplest concept incomprehensible by over-explaining it to death.

  • @TheDuckofDoom.
    @TheDuckofDoom. Před 6 lety

    Good effort.
    You forgot the essential role of the delay in the control feedback loop, without this system delay there would be no need for PID controllers.
    I wish I could recall the website I found many years ago(~15) explaining PID control, it was very spot on, covered the math in a reasonable manor(especially the strengths of the three components at different levels of initial error) and it had some very nice example graphs.

    • @davidledger5941
      @davidledger5941 Před 6 lety

      Delay isn't the only reason for PID controllers, infact in many system models it can be ignored. Delay is very significant in systems involving heating and cooling and I suppose I did talk about that so maybe should have mentioned it.

  • @JGnLAU8OAWF6
    @JGnLAU8OAWF6 Před 6 lety +2

    Do more videos on control theory, that stuff is amazing.

  • @blickberg8404
    @blickberg8404 Před 6 lety

    Awesome video.

  • @mdrew44628
    @mdrew44628 Před 6 lety +3

    Great explanation. Looking forward to the continuation of the series

  • @ajj7794
    @ajj7794 Před 4 lety

    WHERE is the NEXT VIDEO. I LOVE your method of teaching. pls do more. i have done courses in control but i feel enlighted each time i watch great videos as this really show how simple PID control theory is.
    i still am not very confided on the propotional part but i have a good idea as its just an offset constant but still i would like to improve my understanding of it furthur and thus seeing ure example with an actual system will be veyr useful.
    i am very greatful for this.
    MANY THANKS

  • @toastrecon
    @toastrecon Před 6 lety

    Very helpful, thank you!

  • @miketel01
    @miketel01 Před 6 lety

    Yay! It's David2 Awesome Bro

  • @sher.5027
    @sher.5027 Před 3 lety

    Thanks for this video.

  • @CarstenGroen
    @CarstenGroen Před 6 lety

    Great video Dave(2) !

  • @CanDoo321
    @CanDoo321 Před 6 lety

    Thank you David.

  • @sloMoses
    @sloMoses Před 6 lety

    Well done. Thank you.

  • @spikeyeddy
    @spikeyeddy Před 5 lety

    great explanation

  • @revealingfacts4all
    @revealingfacts4all Před 6 lety

    Excellent video. I develop software for autonomous vehicles in the agricultural industry. Our controls engineers use simulink to develop their "models" and I develop the wrapper code as we call it to feed the model with data. Our controls engineers are always tuning the system. Our systems controls a steering valve for an auto guidance application. This video filled in some gaps for me. Now I know what my controls engineers are really doing lol...

  • @guillep2k
    @guillep2k Před 6 lety

    Hi. Perhaps the spring analogy for the P component was really evident for people who already knew the theory, but I didn't get it at all. There was no working example. The I component explanation was very clear, and although the D component explanation was a little rushed, I think I've got it as well.

  • @ocnyoura6803
    @ocnyoura6803 Před 5 lety +6

    "Cooking my chicken at 10 degrees" lmao

  • @rowlandcrew
    @rowlandcrew Před 6 lety

    my vote: construct on a protoboard the simple RC feedback opamp, feed in a pulse to obtain a desired pulse integral with visible over/undershoot. Be literal with how you get Ku and do the 4 iterations to adjust "pole-zero". Great Start!

  • @mortenlund1418
    @mortenlund1418 Před 4 lety

    Nice explanation