How to Visually Tune PID Control Loops

upgrdman
upgrdman
95.3 هزار بار بازدید - 8 سال پیش - This video shows how I
This video shows how I tuned the PID control loop of a balancing robot. The behavior of the robot is shown, and perhaps more importantly, I also show live graphs of the error, set point, proportional component, integral component and derivative component. Finally the source code is shown and explained.

The video starts with a brief demo of how the robot performs with a tuned PID control loop. The balancing robot does not have any wheel encoders or other position feedback, so the only control loop inputs are the pitch of the robot and the throttle input from the user. Because of that, the robot can drift a little if it picks up speed, but even so, with a properly tuned PID control loop it performs fairly well.

I then show a proportional-only control loop and we see how it performs when the gain is too low or too high.

Next I add the integral part, forming a PI control loop. Again, I show how it looks when the gain is set too low or too high.

Then I add the derivative part, forming the PID control loop. The derivative part helps to dampen oscillations and really brings everything together. Like before, I also show how it behaves when the gain is too low or too high.

Finally I show the source code written for an STM32F0 microcontroller, and explain how it works.

The source code is available here:
https://github.com/farrellf/Balancing...

This video is part of a series showing how to build a balancing robot:

Part 1: Modify RC Servos for Continuous Rotation and External H-Bridge Control
Modify RC Servos for Continuous Rotat...

Part 2: Building a Robot Chassis with Brass Square Tube, a Dremel, and Solder
Building a Robot Chassis with Brass S...

Part 3: First Steps with a GY-86 10DOF Sensor: MPU6050, HMC5883L and MS5611
First Steps with a GY-86 10DOF Sensor...

Part 4: 6DOF & 9DOF Sensor Fusion with Madgwick's Filter, MPU6050, HMC5883L (GY-86 Module)
6DOF & 9DOF Sensor Fusion with Madgwi...

Part 5: How to Use CC2500 PA LNA 2.4GHz Wireless RF Modules
How to Use CC2500 PA LNA 2.4GHz Wirel...

Part 6: GPU-Accelerated Data Logging and Telemetry
GPU-Accelerated Arduino Data Logging ...

Part 7: [THIS VIDEO] How to Tune PID Control Loops Visually
How to Visually Tune PID Control Loops
8 سال پیش در تاریخ 1395/09/27 منتشر شده است.
95,394 بـار بازدید شده
... بیشتر