Implementing the PID Controller in Software

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 33

  • @fxzn
    @fxzn 5 หลายเดือนก่อน

    Thanks for this video, it's very intuitive for anyone to understand. I am a high school senior with no calculus experience trying to simulate a quadcopter drone in a game engine and it's working brilliantly thanks to your explanations.

    • @Qaidi_804
      @Qaidi_804 5 หลายเดือนก่อน

      which game you're using for simulation?

  • @stevenbroshar7948
    @stevenbroshar7948 5 วันที่ผ่านมา

    Thanks. I'm a software guy; not a controls engineer. I estimated a temperature control algorithm to take 8 hours to write then discovered that PID might be what I should implement. I should have estimated 8 days ... or weeks. :)

  • @danielwait8555
    @danielwait8555 4 ปีที่แล้ว +6

    Actual practical engineering knowledge...I never knew that was available nowadays. Too much academia, not enough of this. Thanks

  • @uzimonkey
    @uzimonkey 8 ปีที่แล้ว +2

    Thanks for these videos. I use PID controllers in a bit of a different setting: game development. They're useful for just about everything in and out of the physics engine and they're kind of my go to "make this thing go here or do this other thing" component and it's cheap computationally as well. But anyway I'd discovered about windup the hard way, I had a number of thrusters controlling a spaceship, each thruster error is based on the velocity and angular velocity compared to the desires velocity and angular velocity. You can make a spaceship of any shape, stick thrusters on it anywhere you want and they'll just figure out how to go by itself, but every once in a while it would just decide to fly off into space sideways. I had narrowed it down to the I parameter and I just disabled that (it's not really necessary here, being a zero-friction environment) but now I understand what's going on with it.

  • @fifoux082
    @fifoux082 2 ปีที่แล้ว

    Thank you for your video, for the integration wind up the first value is 0?

  • @ashwin372
    @ashwin372 ปีที่แล้ว

    wow thank you so clearly explained

  • @Tutoelectro1
    @Tutoelectro1 4 ปีที่แล้ว +2

    Te olvidas del efecto polarizador que tienen las redes sociales y los algoritmos de recomendación. Cada vez te recomiendan más contenido del que tú crees o que va en contra de lo que tú no crees.

  • @ArturoLopezPadilla
    @ArturoLopezPadilla 6 ปีที่แล้ว +1

    Thanks you very much. It is a wonderful contribution.

  • @TheRainHarvester
    @TheRainHarvester 4 ปีที่แล้ว

    Have you ever tried zeroing out the iTerm when crossing the setpoint?
    I noticed it's always retaining it's value when overshooting, when it should really help the system to go the opposite direction.

  • @cristinosouza
    @cristinosouza 8 ปีที่แล้ว +2

    Thanks for these video!! :) it was really useful for me

  • @jugnu361
    @jugnu361 4 ปีที่แล้ว

    BEST ON INTERNET

  • @darkrasen
    @darkrasen 3 ปีที่แล้ว

    Thanks for this video!

  • @isokemisoke
    @isokemisoke 3 ปีที่แล้ว

    Sir, I am confused with Sampling Time constant. Of course we have to put our PID into a timer instead of infinite loop but, I realized that you didn't add sampling time constant to into your I and D expression. When I surfed on the net, there are some PID controllers which also includes sampling time. What will I am gonna do ?

  • @sivaramarajusiv7826
    @sivaramarajusiv7826 3 ปีที่แล้ว

    Why oscillations occur in the controller output if the PI gains are increased?

    • @KyranFindlater
      @KyranFindlater 3 ปีที่แล้ว

      I gains do not help with overshoot, only correcting steady state/DC error. The P gain being too high will cause overshoot, if there isn't enough D gain to compensate/slow it down

  • @Olavotemrazaodenovo
    @Olavotemrazaodenovo 7 ปีที่แล้ว

    Thank you, you made it very easy. Whare are you from?

  • @anasrababaah4616
    @anasrababaah4616 7 ปีที่แล้ว +2

    that was very useful thaaaaaaank you

  • @user-oo8zt1sc1c
    @user-oo8zt1sc1c 6 ปีที่แล้ว +1

    great video!

  • @stewedapple
    @stewedapple 7 ปีที่แล้ว +2

    Thanks for this video too!

  • @turtleyoda7703
    @turtleyoda7703 5 ปีที่แล้ว

    Great video! Thanks

  • @marekpiirikivi9877
    @marekpiirikivi9877 5 ปีที่แล้ว

    Hello and thank you for informative video. I have couple of questions about integration part. Firstly, should I reset integration once I supply new command (goal)? I was thinking that integrated error no longer stays valid for different command. Secondly, what about systems where set value (command) remains the same (such as desired angle for balancing systems)?

    • @wescottdesignservices8928
      @wescottdesignservices8928  5 ปีที่แล้ว

      Whether you do that depends on the problem at hand. On a servo system where the command is constantly changing, no, you don't want to do that. On a system where there's are distinct setpoint changes -- maybe. Some practitioners always do, some always don't, and some look at the characteristics of their particular system and make an informed decision.

    • @TheRainHarvester
      @TheRainHarvester 4 ปีที่แล้ว

      Or, if you overshoot, why not test the integrator? If you don't reset, then the integral will still be pushing the system to overshoot, instead of bringing it back down to the setpoint. Am I thinking correctly?

  • @David_94
    @David_94 4 ปีที่แล้ว

    I'm trying to understant why interrupts are needed when the PID is going into a microcontroller

    • @danielwait8555
      @danielwait8555 4 ปีที่แล้ว +1

      It's been a while since I watched this video so I may be wrong, but no one has offered a reply. I am merely a student but I'll do my best...
      This is a discrete PID controller, not continuous control, which generally implies a fixed sampling rate.
      Most sensors use I2C or SPI bus to transfer data. The simplest way to read data is to poll the data on each pass in the main loop; however, you'll often be reading the same, unchanged data out of the sensor's buffers.
      Normally, the sensor can generate an interrupt when new data has been internally captured (which will occur at a fixed rate). So if you have a SISO system such as this, your sampling rate can be determined by the sensor's update speed.
      However, for a MIMO system, it may be wiser to have a clock generated interrupt to indicate that data must be read from all the sensors and the output on the DACs must be changed.

  • @andrzejskrzynski445
    @andrzejskrzynski445 6 ปีที่แล้ว

    hey, is band limited derivative somehow connected to a kalman filter ?

    • @wescottdesignservices8928
      @wescottdesignservices8928  6 ปีที่แล้ว

      Sorta kinda. Strictly speaking, a Kalman filter is a linear, time-varying filter that has one output per state, and usually has more than one input. Moreover (and folks forget this part) the only thing really special about it is that it's designed using a specific design methodology that takes the system characteristics into account and designs a filter that's optimal for that system and a specific set of optimization criteria. From that standpoint, no, a band limited derivative is not a Kalman filter.
      Practical Kalman filters often settle out asymptotically to a non-time-varying version; it's called the "steady state Kalman filter". If you set out to estimate the position and velocity of something like that from noisy position measurements using a Kalman filter, the velocity estimate of the steady-state version of that would be a band limited derivative filter, or something close.

  • @panduwilantara3070
    @panduwilantara3070 ปีที่แล้ว

    could you give me your source code?

  • @fuzzy1dk
    @fuzzy1dk 8 ปีที่แล้ว

    is it just me that think that "anti windup" would more accurately describe something that stopped the integrator when the output of the controller is already at max ?

    • @wescottdesignservices8928
      @wescottdesignservices8928  8 ปีที่แล้ว

      You know, I just heard the term a long time ago (right after someone saw a controller that I'd implemented without anti-windup, and exhibiting classical symptoms). I've used it since without really thinking about it.