[Vex IQ] Design PID formula to Fit Your Robot

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

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

  • @tgssabri
    @tgssabri 7 дней назад

    Thank you so much for your videos, now PID makes much more sense to me

    • @MatthewChou0
      @MatthewChou0  7 дней назад

      No problem! Thanks so much for watching my videos

    • @MatthewChou0
      @MatthewChou0  7 дней назад

      I'm glad it helps :)

  • @doducthanhbk
    @doducthanhbk Месяц назад +1

    Nicely done! Thanks for sharing

  • @9933X-VIQRC
    @9933X-VIQRC Месяц назад

    Great explanation! Loved the examples and the data🎉🎉🎉

  • @jasonmei3132
    @jasonmei3132 18 дней назад +1

    Do you have to use a gyro, or can you use brain inertial? Also, whenever i set Walkheading 1800 heading 0, it just spins around instead of going forward.

    • @MatthewChou0
      @MatthewChou0  16 дней назад

      That sound that the error calculation is reversed. Brain inertial report opposite direction angle. Check this video "sensor" for the detail: ruclips.net/video/rX9x5GWai5I/видео.htmlsi=pIgFu7FdWNJyiFto
      One way to fix it is to reverse the velocity logic. It sounds that it is turning the opposite direction.

  • @doducthanhbk
    @doducthanhbk 24 дня назад +1

    How do you do just turning (e.g., turn 90 degrees)? Would it be LeftMotorSpeed = turnKD * error; RightMotorSpeed = - turnKD * error?

    • @MakaylaChou
      @MakaylaChou 23 дня назад +1

      That looks right. That formula would make the robot turn in the same position without it moving forwards. Matthew is out for 10 days but he may be able to give you more details when he returns.

    • @doducthanhbk
      @doducthanhbk 23 дня назад

      @MakaylaChou thanks! Let me know when Matthew is back and how he thinks about this?

    • @MatthewChou0
      @MatthewChou0  15 дней назад

      Thanks for the wait. A new video is coming tomorrow on this subject. I hope it helps. :)

  • @bloxboy2b893
    @bloxboy2b893 Месяц назад

    How do you reverse

    • @MatthewChou0
      @MatthewChou0  Месяц назад

      @@bloxboy2b893 Hi, thanks for watching the video! There are two ways to do this. Creating a separate myblock for moving backwards or adding a parameter in your myblock to tell robot either walk forward or backwards. If you are new to the coding, making a separate myblock is cleaner and your code is easier to read/fix.

    • @bloxboy2b893
      @bloxboy2b893 Месяц назад

      @@MatthewChou0 can you give me a example

    • @MatthewChou0
      @MatthewChou0  Месяц назад

      @@bloxboy2b893 So, in the formula, the left wheel speed and right wheel speed would be negative to go reverse. For the robot to adjust clockwise, instead of right wheel slow down, we need left wheel to slow down. For the robot to adjust counter-clockwise, we need right wheel to slow down. It is opposite to go forward. So here is the formula (MaxSpeed is the maximum velocity your robot can run):
      In the situation that Error >0: SetLeftWheelVelocity = - MaxSpeed: SetRightWheelVelocity = - MaxSpeed + Kp*Error
      In the situation that Error

    • @bloxboy2b893
      @bloxboy2b893 Месяц назад

      @@MatthewChou0 I’m sorry I just don’t understand could you send a photo of our you would do it in the code

    • @MatthewChou0
      @MatthewChou0  Месяц назад

      @@bloxboy2b893 No worries. I'll include that in the next video. Stay tuned.

  • @madisoglrobotics
    @madisoglrobotics 2 месяца назад +4

    Love this kid (platonically)

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

      Thanks! How's your robot coming along? Feel free to ask if you need some more PID help

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

      @ what’s your discord

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

      @@madisoglrobotics inotmatt

  • @RyanL-f5e
    @RyanL-f5e Месяц назад +1

    is it the same guy as before

    • @MatthewChou0
      @MatthewChou0  Месяц назад

      Yeah, have we met in a competition before?