Use this two-wheel inverted pendulum (TWIP) simulator to find feedback gains to balance a simulated version of our lab robot. The gains needed are the the wheel angle gain, the wheel angular velocity gain, the body angle gain, and the body angular velocity gain. These four gains are components of the vector Kc in the simulator code.
You can use any method you like to do this. These Matlab examples show how to use optimization to find gains that work. We will later talk about Linear Quadratic Regulator (LQR) approaches, as well as reinforcement learning (RL) approaches that use neural networks. You can google LQR and reinforcement learning to find out how to do these. The TWIP is similar to an inverted pendulum mounted on a cart (Google "cart-pole"), so solution methods that work for the cart-pole should also work for our TWIP. The cart-pole mechanism is often used in machine learning studies.
What to turn in:Your writeup of what you did, how you did it, and what you learned is what is important here. If you just manually searched for 4 numbers that worked, describe how many tries that took, and how you decided what the next set of numbers to try after each test. If you used some other method to automate the search, describe that method. You are encouraged to tackle this problem in several different ways, but that is not a requirement.