Welcome to the "Inverted Rotary Pendulum" GitHub repository! This project focuses on implementing a State Space feedback controller to stabilize an inverted Rotary Pendulum around its upward position using Arduino. Additionally, the repository includes a simulation of the inverted rotary pendulum with the controller in Simulink and code to estimate the parameters of the DC motor.
The SS_Feedback_Controller directory contains the source code written in Arduino for implementing the State Space feedback controller. The controller is designed to stabilize the inverted Rotary Pendulum, maintaining its equilibrium position.
To run the Arduino code:
- Open the Arduino IDE.
- Create a new project.
- Copy and paste the code from the
SS_Feedback_Controllerdirectory into the Arduino IDE. - Connect your Teensy 4.0 board and upload the code.
The Simulation of IRP Control directory includes a Simulink model for simulating the behavior of the inverted rotary pendulum with the implemented State Space feedback controller. This simulation provides insights into the system's dynamics and the controller's effectiveness.
To run the Simulink simulation:
- Open MATLAB and navigate to the
Simulation of IRP Controldirectory. - Open the Simulink model file using the instructions given in the Readme file.
- Run the simulation to visualize the behavior of the inverted rotary pendulum under the State Space feedback control.
In the Estimation of DC Motor Parameters directory, you will find code related to the estimation of DC motor parameters. Accurate motor parameters are crucial for the proper functioning of the feedback controller. This code helps in identifying and setting the necessary motor parameters.
To estimate DC motor parameters:
- Navigate to the
Estimation of DC Motor Parametersdirectory. - Run the parameter estimation code using the instructions given in the Readme file to determine the DC motor parameters.
If you find any issues or have suggestions for improvements, feel free to contribute! Fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License, allowing for open collaboration and sharing.
Feel free to explore the project, learn from it, and adapt it to your needs. Happy coding! 🚀