STM32 motor control: PID theory and implementation

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ •

  • @steppeschool3629
    @steppeschool3629  2 роки тому +2

    Hello guys. This video is about the PID controller and how to implement it in embedded systems. The source code and slides can be found on: www.patreon.com/posts/pid-control-code-75506709?Link&
    www.steppeschool.com/products/communities/steppeschool-miscellaneous

    • @payalpal4386
      @payalpal4386 Рік тому

      The accessibility is denied. Cannot read further unless payment is successful.

    • @steppeschool3629
      @steppeschool3629  Рік тому

      @@payalpal4386 It is paid content. For the price of a cup of coffee, you get access to a whole range of valuable materials: pdf documents, source code, etc. And this small fee allows me to keep creating more useful content for you.

    • @botak333
      @botak333 9 місяців тому

      It posible to control 3phasa motor pmsm sir???

    • @botak333
      @botak333 9 місяців тому

      It posible to control 3phasa pmsm motor sir?? With 2000ppr encorder ABZ

  • @sumedhburbure4173
    @sumedhburbure4173 3 місяці тому

    wonderful demonstration of the PID controller!

  • @wasifmehmood85
    @wasifmehmood85 8 місяців тому +2

    Hi yerke! I want to know how did you define the value UPDATE_RATE?

    • @steppeschool3629
      @steppeschool3629  8 місяців тому +1

      Hi! In my project, it is 1 kHz

    • @AdaptivePhenix
      @AdaptivePhenix 4 місяці тому

      To actually answer your question; it's generally accepted that the ideal sampling frequency is 5 or 10 times greater than whatever you're driving can respond. So, in this case of 1KHz, it's ideal for a plant that can respond @100Hz (10ms). In my own case where I use motors of 2KW+, anything faster than 250Hz is a waste of processing power.
      This demonstrated PID is known as "continuous" which I would never use. The "discretized" method is far superior, in my experience and doesn't require the moving average filter.
      Recommended references are Dr. Jacob Tal (my mentor) and Chuck Lewin of PMD. Both of these gents explain everything in a way that mere mortals can actually understand. 😁

  • @benjaminshields9421
    @benjaminshields9421 Рік тому +2

    How do you find the time required for division affects the process in a full implementation with multiple PIDs and MIMO systems?

    • @steppeschool3629
      @steppeschool3629  Рік тому

      Hi
      I am sorry, but I did not fully understand your question. What do you mean by division? Do you mean the time for computation?

  • @lohikarhu734
    @lohikarhu734 6 місяців тому

    It would be interesting/useful, to show, on the graph of the motor speed, the PWM value that is applied, so that we could see the action of the differential and proportional functions make the quick response of the PWM, and the slower changes due to the integral part... Hmmm... Possibly also show the values of each of the three correction terms?
    But, maybe that's in the next video?

    • @steppeschool3629
      @steppeschool3629  6 місяців тому +1

      It could be really interesting to show that using an oscilloscope, which I do not have currently😀

    • @AdaptivePhenix
      @AdaptivePhenix 4 місяці тому

      At a sample rate of 1KHz?

  • @unholy1771
    @unholy1771 8 місяців тому +1

    Thanks a lot! May I ask why use a moving average filter instead of a low pass filter?

    • @steppeschool3629
      @steppeschool3629  8 місяців тому

      It works much faster than a low pass filter. Of course, the low-pass filter can be used instead of the moving average.

    • @unholy1771
      @unholy1771 8 місяців тому

      @@steppeschool3629 really surprised to hear it works faster honestly.
      What about delay? Doesn't the moving average add more delay because of the more samples?

  • @rajdeepdas86
    @rajdeepdas86 Рік тому +1

    very good bro

  • @yigitmertsevindim1669
    @yigitmertsevindim1669 Рік тому

    Why using filters ? For calculate clear?

  • @lailasymky2750
    @lailasymky2750 Рік тому

    Can u give the code please?

    • @steppeschool3629
      @steppeschool3629  Рік тому +1

      You can find the source code and tons of other materials on my Patreon page:
      www.patreon.com/user?u=80399744

    • @sinhphan8202
      @sinhphan8202 Рік тому

      @@steppeschool3629 Does it cost 7 dollars to read the code??

    • @steppeschool3629
      @steppeschool3629  Рік тому +1

      Yes, it does. You will unlock access to all projects.