How to Tune a PID Controller for an Inverted Pendulum | DigiKey

Поделиться
HTML-код
  • Опубликовано: 6 окт 2024

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

  • @gamerscomplete
    @gamerscomplete Год назад +35

    I really appreciate that DigiKey is paying for videos like this to be made, it doesnt directly support sales of a particular product or even a direct tie in with DigiKey themselves. Just informative videos to garnish good will and brand recognition. This sorta stuff makes me want to purchase from DigiKey and/or refer to colleagues more than any product/brand specific videos would. As usual, another great video from Shawn Hymel

    • @mjolnirforsworn
      @mjolnirforsworn Год назад +2

      Honestly some of the best ads I've ran across. I appreciate them too!

  • @1082511
    @1082511 Год назад +5

    Thank you, Digikey team and Shawn Hymel for this nice introductory instruction guide for PID controllers tuning.

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

    I have been doing a PID controller for a reflux system for the last year. This is a great intro. There is only one more item I would add, being 'windup' handling. It can be the difference between controllable and not at all. I have never used a derivative but it is meant to be handy for speeding the approach to setpoint. For my use, a slow and steady approach with a well tuned integral wins by a long way.

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

      While derivative can speed up reaction time, it is not well suited with high frequent errors going up and down. It needs a clean signal to work well.

  • @BerndFelsche
    @BerndFelsche Год назад +2

    A usefully instructive video for getting from theory to practice.
    As an aside...
    Float variables are quite slow on AVR Arduino. Scaled integers are much faster, which can be significant in reducing controller loop delays.
    Such delays can wreak havoc in real world systems as they are significantly variable, depending on the values of variables and therefore difficult to tune out.

  • @danhtrinh1769
    @danhtrinh1769 Год назад +2

    Thanks Digikey for these educational videos! This tips the balance of why I will buy parts for work from Digikey as opposed to the competitors.

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

    What a complete introduction to PID control. Thanks!

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

    Nice little "Great Scott" shout-out at the beginning 🙂

  • @ident1ty
    @ident1ty 11 месяцев назад +1

    this is such a great video! you explained the concepts so well! great effort :D

  • @lesvh740
    @lesvh740 11 месяцев назад

    It would be fun to replace the rotary encoder with imaging. Great video!

  • @pacocubi2845
    @pacocubi2845 Год назад +3

    So cool! Will we ever see a micropython version?

    • @ShawnHymel
      @ShawnHymel Год назад +3

      Good to know there's interest. It should be fairly straightforward to implement in micropython--the Python code for the PID controller should be the exact same. The only think you need to change is the encoder reading and stepper motor control.

  • @michaelnilan7413
    @michaelnilan7413 Год назад +2

    Thank you for the great content ❣

  • @jimomertz
    @jimomertz Год назад +3

    This was great, but I would have expected you to disturb the pendulum while it was stable, by giving it little bumps, and see how it reacted. Also would have been nice for a bigger screen to see the pendulum better.

  • @jacksonsee2746
    @jacksonsee2746 Год назад +3

    Cool!!!

  • @verdw6587
    @verdw6587 9 месяцев назад

    Well presented tutorial Shawn, very informative. Question, what if Kp was a negative number, what would be the effect of the PID?

  • @MohamadSayadiFars
    @MohamadSayadiFars 2 месяца назад

    I love you. I like to watch all your videos

  • @happyday.mjohnson
    @happyday.mjohnson Год назад

    Thank you Shawn and Digikey. The two part series was very good. Question: what if the PID controller is to operate the supply of CO2 within a Grow Tent (CO2 can help plants grow 30% more)? Here we deal with not only fans blowing around, but the distribution of CO2 through a cylinder within a room distributed with plants ?

    • @ShawnHymel
      @ShawnHymel 11 месяцев назад +1

      If the CO2 and fans operate together, you can use a single PID controller that has one output. If they need to operate separately, then you likely need two different controllers or look for a more advanced Single Input Multiple Output (SIMO) or Multiple Input Mulitple Output (MIMO) control scheme.

  • @Baker_FPV
    @Baker_FPV 8 месяцев назад

    This is so good

  • @mekkarmikke
    @mekkarmikke 7 месяцев назад

    Thanks so much for this great video! Top quality!

  • @paulp1204
    @paulp1204 Год назад +2

    Would you mind sharing the python code?

  • @eddyfontaineyoutu100
    @eddyfontaineyoutu100 Год назад +2

    👍👍👍

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

    Is integral just another proportional if intervals are equal?

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

      Integral sums the errors as a term. Proportional is error times a constant as a term. Sampling interval being equal make it easy to calculate integral with just a summation.

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

      @@danhtrinh1769 | Is it possible integral is drifting away due to floating point error?

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

      @@rasimbot Someone else in the comments mentioned integral windup. If your system never reaches your target value the integral term just keeps getting larger and larger and this is know as windup.

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

      @@danhtrinh1769 | What if you stored a certain number of recent errors in a buffer and calculated the integral over only the most recent data?

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

      @@rasimbot That is one possibility. I don't know how well it would work. Worst case your buffer contains a bunch of huge error values. Looks like there are many ways to handle integral windup based on Google searches. In some cases, the techniques are proprietary and not published. Ultimately, you could try a bunch of different techniques and plot your system response to see how quickly it settles.

  • @xephael3485
    @xephael3485 11 месяцев назад

    Does anybody just want to get out there bat 🏏and pretend this guy is the printer in office space?
    I've received this advertisement on my RUclips feeds at least 100 times..

  • @mikekiel605
    @mikekiel605 9 месяцев назад

    I am so so sick of your stupid inverted pendulum ad make a new one

  • @wethumour
    @wethumour 9 месяцев назад +1

    Pretty cool. You should have out the encoder graph as the first one so you needn’t have had to keep scrolling up and down. And yes, I am going to dive into PIDs thanks to this video. Only been several decades of weak excuses aka lethargy.