This document summarizes a student project on stabilizing and balancing linear and rotary inverted pendulum systems. It discusses the design and implementation of PID controllers to balance an inverted pendulum mounted on a cart (linear system) and a rotary inverted pendulum prototype. Key steps included mathematical modeling, simulation in MATLAB, PID controller tuning, and applying the controller to experimental setups. Results showed the systems could be stabilized using optimized PID and LQR controllers designed via pole placement and minimizing cost functions.