Это видео недоступно.
Сожалеем об этом.

Robot Controllers Part 1: PID (with Dr. Christian Hubicki)

Поделиться
HTML-код
  • Опубликовано: 17 авг 2024
  • In this live stream, ​‪@chubicki‬ and I are teaming up to build a PID Controller, first in python and then in p5.js!
    Base Python code: tinyurl.com/ca...
    Final Python code: tinyurl.com/ca...
    p5.js sketch: editor.p5js.or...
    GitHub Repo: github.com/Cod...
    Demo: codingtrain.gi...
    Dr. Christian Hubicki is an Assistant Professor of Mechanical Engineering at Florida State University and the FAMU-FSU College of Engineering. As Director of the Optimal Robotics Laboratory, his research specializes in bipedal locomotion, specifically optimization methods that apply to both legged robotics and biomechanics.
    Follow Christian!
    🐦 / chubicki
    🖼 / chubicki
    ▶️ / @chubicki
    🔴 / chubicki
    0:00 Waiting to Start
    4:38 Welcome!
    7:30 Introducing Dr. Christian Hubicki
    9:49 Christian's Introductory Presentation
    14:48 How to Follow Along
    16:22 PID Controller Lecture
    44:09 Coding in Python!
    1:23:58 Introducing p5.js and matter.js
    1:37:18 Coding in p5.js!
    2:48:30 It works!
    2:49:19 Wrapping up and next steps
    🚂 Website: thecodingtrain....
    💬Discord: / discord
    💖 Membership: ruclips.net/user/the...
    🛒 Store: standard.tv/co...
    📚 Books: www.amazon.com...
    🎥 Coding Challenges: • Coding Challenges
    🎥 Intro to Programming: • Start learning here!
    🔗 p5.js: p5js.org
    🔗 Processing: processing.org

Комментарии • 87

  • @samuelm2111
    @samuelm2111 2 месяца назад +1

    This is one of, if not the best explanation I have seen for the PID controller. Kudos to the doctor for breaking this down and building it back up from first principles. Great job!

  • @Krazy0
    @Krazy0 4 дня назад

    Watched the PID lecture, then sped the video till I reached the result in p5.js and I was so impressed and amazed that I honestly smiled because of how great the video is, also I was going to use it in few days because I was doing a drone from scratch, now just setting up the MCU for communicating with the IMU, cheers!

  • @jnsjknn
    @jnsjknn 2 года назад +58

    I'm an automation engineer and part of my job is to write code to control the air flow and air temperature of HVAC units with PID controllers (mostly just PI, actually). I have also practiced JavaScript for 3 years. I got started with JS programming through p5.js, inspired by this RUclips channel. If I can somehow use my skill set to help the Coding Train community, I'd be happy to help.

    • @TheCodingTrain
      @TheCodingTrain  2 года назад +15

      I probably won’t get to setting it up until tomorrow but would welcome contributions to the GitHub repo for this stream!

  • @ZacharyVogt
    @ZacharyVogt Год назад +4

    I used to be a regular viewer of this channel. I'm still subscribed, but I have to admit my viewership has really fallen off for a couple years. But I decided to watch this one; and kudos to everyone involved; the guest speaker really Perfectly meshed into the whole vibe of the channel. Overall an A+ entry in the catalog.

  • @StefanVosloo
    @StefanVosloo Год назад +4

    Great video! I was always scared by the calculus in PID controller and never attempted to code it up, but seeing how simple it really is is amazing! You're both great teachers.

  • @kamtono5768
    @kamtono5768 2 года назад +4

    Survivor!!!!!!! Whaaaaaat!! this is Awesome!!!!

  • @Chrls5
    @Chrls5 2 года назад +6

    i found Christian a super insteresting, very smart guy! this lecture was very interesting and fun to watch, i would love to see more crossovers like this Daniel! thanks for this!
    👏🙏

  • @d_lollol524
    @d_lollol524 2 года назад +23

    I hope this video be available in the future when I need to watch it again ..

  • @geoffkuhl
    @geoffkuhl 2 года назад +2

    Very Awesome - thank you so much!
    Nothing better than watching a video and then needing to get out your favorite editor right away and start playing :)

  • @Marius-of6ty
    @Marius-of6ty 2 года назад +10

    Hey Dan and Christian, very cool video! I am now writing my bachelors thesis on controlling a triple linked pendulum so this is coming just at the right time for me! Please more collabs like this :)

    • @R67K
      @R67K 2 года назад

      I would love to see this thesis. I am intrigued by this topic.

  • @mistery79
    @mistery79 Год назад +1

    We use PID to tune drones. This is very informative. Thanks

  • @R67K
    @R67K 2 года назад

    I will repeatedly watch this video until i understand it. Thanks for sharing. I am enjoying it a lot.

  • @evanbarnes9984
    @evanbarnes9984 2 года назад +2

    This is so awesome! Thanks for providing your expertise, each of you. I learned a lot!

  • @cleisonarmandomanriqueagui9176
    @cleisonarmandomanriqueagui9176 2 года назад +3

    I really admire this guy

  • @fourorigin4676
    @fourorigin4676 2 года назад +8

    What about the PI control? this one is a great one when having to control continuous flow, speed, pressure, etc!.
    Great stream!, looking forward for more of these! Thanks Daniel and Christian!

    • @AGPROHL
      @AGPROHL 2 года назад +3

      Definately, for jerky movements that go back and forth, you want more of a PD controller, but when the motion is continuous, like the speed of a motor in a CNC lathe, the disturbance being the force imprinted by the material over the working tool, so the controller has to compensate in the same direction, has to settle fast, with no overshoot, then the PI controller is best for this! Dr. Christian is Spot on in every aspect of motion control! really nice!

  • @rodoldreamer
    @rodoldreamer 2 года назад +13

    This was a very interesting stream, I hope to see you doing more collaborations like this

  • @Chrls5
    @Chrls5 2 года назад +5

    i Just Noticed that @1:15:44 when the integral term is added, it looks a lot like a Zero Order Hold, which is a little buffer in digital systems that keeps track of the sampled signal in the digital Domain, very interesting!

  • @knifeninja200000
    @knifeninja200000 2 года назад +2

    that noisy wind would be nice to watch

    • @Chrls5
      @Chrls5 2 года назад

      true, good idea hahaha

  • @DavidS-ji6qv
    @DavidS-ji6qv 2 года назад +6

    Christian Hubicki??? From SURVIVOR?????

  • @afaque.
    @afaque. 2 года назад

    Thank you for putting so much effort in editing this videos.

  • @youreale
    @youreale 10 месяцев назад

    AWESOME!!! love you guys.

  • @Fun-Planet
    @Fun-Planet 2 года назад +3

    Great stream!

  • @Jackolltradez
    @Jackolltradez 2 года назад +1

    Brilliant as always!

  • @unebonnevie
    @unebonnevie Год назад

    Kp, Ki, Kd are all MAGNITUDES; thus are always positive constants/factors.

    • @rocketdawg3000
      @rocketdawg3000 Год назад

      All that really matters is that the gains are the same sign.

  • @adaptine
    @adaptine 2 года назад +1

    I believe the reason you had to invert the gains is the assumption of the positive direction of the angle. In the mathematical formulation it is assumed that counter-clockwise is the positive direction, while in p5.js it is positive in the clockwise direction.

  • @nakulsingh8444
    @nakulsingh8444 2 года назад +3

    Waiting for part 2

  • @DF-ss5ep
    @DF-ss5ep Год назад

    I was taught some control system theory in college and I don't think I got or was even told why the I term was there. I think all I saw was equations. But this was completely clear and made perfect sense.

  • @thehappycoder3760
    @thehappycoder3760 Год назад

    Absolutely brilliant

  • @bigbyallsmay8992
    @bigbyallsmay8992 2 года назад +7

    As a survivor fan too, this crossover is tripping me out - I vaguely remember seeing daniel in a RHAP meetup video once, what are the odds of daniel playing a game of survivor? 🤔😆

  • @jorgeandresgarciamontiel1801
    @jorgeandresgarciamontiel1801 2 года назад +3

    This is the best college class I’ve had

  • @jaans3712
    @jaans3712 2 года назад

    You can run into problems with that error integral. If the actuator output runs to the limit it can cause windup to the integral. There are some fairly complex anti-windup algorithms but the simpliest solution is my favorite: Just add the first-order filtered controller output to the sum. I learnt this from one of Åhström’s books

  • @noooaaahhhh13
    @noooaaahhhh13 2 года назад +1

    Daniel, please play survivor, i think you'll be awesome!!!

  • @simonabunker
    @simonabunker 2 года назад +4

    It would be great if you could look into Kalman filters for predicting and smoothing inputs.

  • @erik....
    @erik.... 2 года назад +1

    I made one of these inverted pendulums in Lego with an AVR controller 14 years ago.

  • @nyscersul42
    @nyscersul42 Год назад

    In conclusion: Dr. Hubicki ate all the pi.

  • @timgluz
    @timgluz 2 года назад

    Thanks!

  • @circulartext
    @circulartext 2 года назад +2

    NICE

  • @ablearner7515
    @ablearner7515 2 года назад

    How I understand PID
    P controller -> Gets you to your desired state
    D controller -> Stops you at that desired state
    I controller -> if something stops you from achieving that desired state then it gives you just enough force to get you there
    (Please corret me if im wrong or tell me about how you understand it)

    • @lmmartinez97
      @lmmartinez97 2 года назад +1

      You're generally right, but you should avoid using derivative terms when possible since a pure derivative term cannot be implemented because it needs future information to operate right. Research the concept of feedback and you'll get a much better idea about what the derivative term does. You have a good simple explanation that's 90% of the way there!

  • @stearin1978
    @stearin1978 Год назад

    I still believe that it is the same guy filmed twice...:-)

  • @mameemia
    @mameemia 2 года назад

    Omg YOURE BACK 😭😭

  • @_QWERTY2254
    @_QWERTY2254 2 года назад

    maybe if we change desired angle little bit based on the PID of (error of centering the rectangle) it would work. Great Video btw

  • @phillipchampion3398
    @phillipchampion3398 2 года назад +2

    Dear God is that the comptroller of slam town?

  • @IlCappellodiIrma
    @IlCappellodiIrma 2 года назад +1

    Molto interessante! 👍
    Iscritta 😊 Buon pomeriggio 🌈

  • @moshesakajo
    @moshesakajo 2 года назад +1

    I hear you fine

  • @neoncyber2001
    @neoncyber2001 Год назад

    Cool I just wrote one of those in unity!

  • @nyscersul42
    @nyscersul42 Год назад

    I think mr special guest is quite used to having a class of people to do lectures to hehe

    • @RedHair651
      @RedHair651 Год назад

      I don't think they were hiding that. He's a professor.

  • @bjoern.molinari
    @bjoern.molinari 2 года назад

    Could you please add the topic of windup in the I part of the PID? And about methods to get rid of it.

  • @alwysrite
    @alwysrite 2 года назад +2

    If you combine PID controller with AI , can we make a PID controller that tunes itself to optimal?

    • @evanbarnes9984
      @evanbarnes9984 2 года назад +1

      They talked a bit about using evolutionary algorithms to tune controllers, which is close to what you're describing. Neural nets are sort of evolved

    • @carlosornelaslim9713
      @carlosornelaslim9713 2 года назад +2

      then just get rid of the PID, and let the AI do all the job

  • @technogaming5606
    @technogaming5606 2 года назад +1

    sir how do you get ridd of the text like :- // noStroke();

  • @francescobaio2912
    @francescobaio2912 2 года назад

    I can't find how to make the processing editor text bigger

  • @circulartext
    @circulartext 2 года назад +1

    WOW HEY DAN

  • @lorenzo42p
    @lorenzo42p Год назад

    the stream auto plays after another video.. "goodbye everybody" stream ends. thank you youtube.

  • @adampm1
    @adampm1 2 года назад

    2:06:37 Christian's reaction 😂😂😂

  • @anga6064
    @anga6064 2 года назад

    Hi, I am new to nature of code and it is mind blowing🤯🤯🤯!!! I like to start learn nature of code. Please guide me, where I have to start?

    • @TheCodingTrain
      @TheCodingTrain  2 года назад

      The answer is kind of an "it depends""! Do you know coding already? If not start here: ruclips.net/p/PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA If you do already know programming then you can jump right to here: ruclips.net/p/PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM

  • @ac2italy
    @ac2italy 2 года назад

    why not using Fuzzy Controllers? Much simpler

  • @evanr.lowetechgamingandcoo1410
    @evanr.lowetechgamingandcoo1410 2 года назад

    What about bob?

  • @renecura
    @renecura 2 года назад +2

    Py Dan is almost as funny than Js Dan.

  • @PR2000
    @PR2000 2 года назад

    When do you do a new video of the Nature of Code 2?

  • @parthvirani4959
    @parthvirani4959 2 года назад

    Hey The Coding Train i have one big challenge for you can you create image which should be clickable, what i mean is we just sharing them across social media but if user open image and tap somewhere inside image then it should be clickable, And I think we might can achive this by manipulating image bytecode hope to see you thoughts on this challenge.

    • @RedHair651
      @RedHair651 Год назад

      I don't understand what you mean

    • @parthvirani4959
      @parthvirani4959 Год назад

      @@RedHair651 as we have actionable pdf where we can set clicks in element, is it possible same for images?

  • @toastyPredicament
    @toastyPredicament 2 года назад

    Hi I got captures by copium addicts.

  • @codingpartner6649
    @codingpartner6649 2 года назад

    What is the use of learning p5.js. It does not make any money to me and, makes money to you.

  • @RicardoOliveiraRGB
    @RicardoOliveiraRGB 2 года назад +2

    What's Dan's instagram?

    • @TheCodingTrain
      @TheCodingTrain  2 года назад

      I don't really use instagram but there is a CT one here: instagram.com/the.coding.train