Manual PID Controller Tuning for an Inverted Pendulum | DigiKey

Added:

PID Intro
Control Basics
Arduino Setup
PC Interface
Motor Test
PID Loop
Tuning KP
Adjust KI
Tuning KD
Final Tuning

PID Intro

0:00
Playing Section
  • 1

    Inverted pendulum requires feedback control to maintain upright position.

  • 2

    Controller uses encoder angle input to command stepper motor adjustments.

  • 3

    Arduino interfaces hardware; Python handles control logic and tuning.

Foundational concepts of Feedback Control Systems, specifically the individual roles of Proportional (P), Integral (I), and Derivative (D) gains.
Basic physics of unstable equilibrium and rotational dynamics, particularly the forces acting on an inverted pendulum.
Introductory microcontroller programming (such as Arduino C/C++) and interfacing with hardware components like rotary encoders and DC motors.
Basic Python programming for serial data communication and real-time plotting.
Algorithmic PID tuning methodologies, such as the Ziegler-Nichols method or heuristic optimization, to transition away from manual trial-and-error.
Modern Control Theory concepts, specifically state-space modeling and designing a Linear Quadratic Regulator (LQR) for more robust control.
System Identification techniques to construct a precise mathematical model (transfer function) of the physical setup.
Implementation of sensor fusion and digital filtering algorithms, such as Kalman filters, to mitigate measurement noise in high-frequency control loops.
76.3K views1Klikes24:50@digikeyOriginal Release: 2023-09-18

This tutorial demonstrates how to manually tune a PID controller to stabilize an inverted pendulum using the STEVAL-EDUKIT01 kit from STMicroelectronics. The process involves setting Ki and Kd to zero first, then gradually increasing Kp until the system approaches the setpoint with minimal oscillation, followed by tuning Ki to eliminate steady-state error, and optionally adjusting Kd to reduce overshoot. The Arduino reads encoder values and drives the stepper motor, while Python code running on a computer implements the PID controller algorithm and generates graphs for visualization. Properly tuned PID controllers can achieve critically damped behavior where the system reaches the desired upright position (180°) quickly without excessive oscillation or overshoot.