Controls project, showing off inverting a double pendulum. Uses a motor belt drive on a MGN12 Rail. Software uses the USB to CAN function of the Spark Max to do current control from a LQR controller.
I have recently graduated highschool and finished with FRC, now being a alum, and I wanted to put the things I learnt to use. The pendulum tests my knowledge in design, physics, math, and control theory. It also allows me to explore a LQR, a controller I have not used before while staying with a relitivly simple design.
The cart is the only really strict part. Make sure wires are routed nicely. Second stage encoder wires should go through the middle of the first stage shatft.
The main rail may be made of multiple section of rail, given that they get joined properly.
Have UV set up with a python interpreter Here
- Run
uv sync - Run
uv run LQR_Gains.py