
Control of a Double Inverted Pendulum
This project was something I built while experimenting with using Simulink to model physical systems for the purpose of software in the loop (SIL) or hardware in the loop (HIL) testing. This was something that I was beginning to work on while designing SIL/HIL testing processes at Embark and I wanted to continue my learning in this area.
​
This project was first a small experiment to model and animate a physical system, but I ended up extending the project to fully design a control algorithm to theoretically balance a realistic inverted double pendulum.
Beginning this project, I wanted to model a double pendulum and produce an animation of it to demonstrate chaos theory. Having never used Simulink to animate something before, I saw this as a good way to in the future, animate more complex systems when designing control algorithms. Once I had this basic part working for a single pendulum and then double pendulum, I wanted to see how difficult it was to design a controller to balance the double inverted pendulum in ideal simulated circumstances.
​
To my surprise, I was able to build a simple LQR controller to balance the double pendulum which was also surprisingly robust when given perfect state information. Once I saw the system and how capable it was in an ideal model, I decided to attempt to simulate a real life environment and design a controller and observer scheme to make such a model work.
I started with modeling an off the shelf gyro in Simulink. Using Matlab, I analyzed the sensor's output and attempted to replicate the exact noise profile and bias characteristics of the sensor within a Simulink model. I then used this model to simulate the sensor feedback of the angular rate of both pendulum stages.
​
To provide state estimate feedback for the LQR controller, I then designed a simple Kalmin filter using a linearized pendulum model about the balanced position for prediction, and my artificial gyro angular feedback to produce an optimal Kalmin filter observer.
​
With this Kalmin filter observer, my LQR controller was more than capable of balancing the simulation leading me to conclude that this system could work effectively if I were to build a physical system with the same sensor feedback that I modeled in Simulink.
​
Related Project Links
I am testing robot localization algorithms in ROS (robot operating system). Currently I am implementing particle filter based localization using a Kalmin filter and LiDAR based scan matching using ICP for prediction and the ICP fitness score for resampling
There are no items in this list