STM32 motor control: PID theory and implementation

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025

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

  • @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 2 ปีที่แล้ว

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

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

      @@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 11 หลายเดือนก่อน

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

    • @botak333
      @botak333 11 หลายเดือนก่อน

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

  • @sumedhburbure4173
    @sumedhburbure4173 6 หลายเดือนก่อน

    wonderful demonstration of the PID controller!

  • @wasifmehmood85
    @wasifmehmood85 11 หลายเดือนก่อน +2

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

    • @steppeschool3629
      @steppeschool3629  11 หลายเดือนก่อน +1

      Hi! In my project, it is 1 kHz

    • @AdaptivePhenix
      @AdaptivePhenix 6 หลายเดือนก่อน

      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. 😁

  • @lohikarhu734
    @lohikarhu734 8 หลายเดือนก่อน

    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  8 หลายเดือนก่อน +1

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

    • @AdaptivePhenix
      @AdaptivePhenix 6 หลายเดือนก่อน

      At a sample rate of 1KHz?

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

    very good bro

  • @unholy1771
    @unholy1771 10 หลายเดือนก่อน +1

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

    • @steppeschool3629
      @steppeschool3629  10 หลายเดือนก่อน

      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 10 หลายเดือนก่อน

      @@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?

  • @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?

  • @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.