Feedback Control of an Inverted Pendulum

Bryan Riley, Augusta Technical College,
Author Profile
Initial Publication Date: October 12, 2023

Summary

Write the equations of motion for a simple inverted pendulum. Design and implement a closed-loop feedback controller (i.e., PID) to keep the pendulum stable for a given set of parameters.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

Students will gain experience in how to utilize MATLAB and Simulink as modern computer tools to investigate and apply to dynamical systems. Given the PID controller is the most widely used control scheme in industrial applications, the implementation of an embedded controller will allow for the determination of stability limits as a function of PID controller gains. Students are empowered to work in groups of 4 and write a final report on the design, troubleshooting, implementation, and testing experiences.

Context for Use

This project is designed to provide "hands-on" and practical experience for students enrolled in a senior-level control system engineering course. The steps of this semester-long project are intended to proceed with lecture progressions starting with obtaining the dynamic response (i.e., response response) to selecting a controller design procedure for Matlab implementation. Students are expected to have successfully completed a prerequisite course in mathematical modeling of dynamical systems. The implementation will also require the assembly of an embedded hardware system utilizing the an STM32 microprocessor.

Description and Teaching Materials

Assembly of a STM 32 microprocessor-based system is required for this project.

The Edukit Quickstart system assembly guide sequence and instructions are available a the website below. The installation of firmware and startup on Microsoft Windows is available along with assembly instructions. Upon hardware-embedded system assembly and firmware installation as provided on the Edukit site the system will automatically start.






Teaching Notes and Tips

Textbooks:
1) System Dynamics 3rd Edition by William Palmn III (McGraw Hill)
2) Feedback Control of Dynamical Systems 8th Edition by Franklin * Powell * Emani-Naeini (Pearson)
3)Control Systems Engineering 8th Edition by Normal Nise (Wiley)

Assessment

Graphical time domain plots of the controller behavior (transfer function) should display underdamped responses for defined natural frequencies and damping ratios.

References and Resources

Assembly and firmware installation is based on the STM32 family of 32-bit microcontrollers. Reference:
https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html

This teaching activity was created as a part of the Teaching Computation with MATLAB Workshop held in 2023 at Carleton College.