===== Lego Rotary Inverted Pendulum ===== **Author:** Joao Matos Email: \\ **Date:** Last modified on 02/27/2017 \\ **Keywords:** Rotary Inverted Pendulum , LQR, NXC. \\ This tutorial presents a Rotary Inverted Pendulum built with Lego parts and controlled using LQR in Simulink and NQC Language. {{ ::caparip.jpg?direct&300 |}} ---- ===== Motivation and Audience ===== This tutorial's motivation is to study about the mechanisms behind the control of a rotary inverted pendulum ,using Lego to build the structure and the NXT Brick to program the balance code using NQC language and the Simulink environment. Readers of this tutorial assumes the reader has the following background and interests: *Inverted Pendulum Mechanisms *Automatic Controls Theory (PID and LQR) *Controls Programming using lego NXT Brick (NQC language). *Controls Programming using Simulink. The rest of the tutorial is presented as follows: *Parts List and Source *Construction *System Modeling *Programming *Final Words ---- ===== Parts List and Source ===== * [[lego_rip_partslist|Parts List]] ---- ===== Construction ===== *[[lego_rip_tutorial| Building Instructions]] ---- ===== System Modeling ===== * [[lego_rip_modeling|RIP System Modeling]] * [[lego_rip_control_lqr|Full state feedback with LQR control]] * [[lego_rip_control_smc|Slide Mode control]] ---- ===== Programming ===== * [[lego_rip_prog|Programming Using Bricx Command Center and Simulink]] ---- ===== System Simulation through Simulink ===== * [[lego_rip_simulation|Simulation Using CAD model and Simulink]] ---- ===== Final Words ===== **Simulink Version**: {{youtube>CVWS4crfsck?medium}} **Bricx Command Center Version**: {{youtube>OQBPhmWz1OY?medium}} Special Thanks to Dr Oh . This Tutorial is based on the following papers and projects: [[http://www.mathworks.com/matlabcentral/fileexchange/50731-physical-modeling-in-academia--the-rotary-pendulum-with-low-cost-hardware|[1]]] [[https://www.youtube.com/watch?v=fUwAYruDaw4&spfreload=10|[2]]] [[http://thescipub.com/PDF/ajassp.2009.1106.1115.pdf|[3]]] [[http://ac.els-cdn.com/S2212017313006415/1-s2.0-S2212017313006415-main.pdf?_tid=ecf6c21c-fbb9-11e5-b920-00000aab0f6c&acdnat=1459921346_d0252fbe1f2f5f90923918197984ecf7|[4]]] [[http://www.nt.ntnu.no/users/skoge/prost/proceedings/dycops2013-and-cab2013/media/DYCOPS/files/0128.pdf|[5]]] [[http://umpir.ump.edu.my/378/1/Shamsul_Nizam_Mohd_Yusof.pdf|[6]]] [[http://download.springer.com/static/pdf/975/art%253A10.1007%252Fs10015-011-0897-9.pdf?originUrl=http%3A%2F%2Flink.springer.com%2Farticle%2F10.1007%2Fs10015-011-0897-9&token2=exp=1459794168~acl=%2Fstatic%2Fpdf%2F975%2Fart%25253A10.1007%25252Fs10015-011-0897-9.pdf%3ForiginUrl%3Dhttp%253A%252F%252Flink.springer.com%252Farticle%252F10.1007%252Fs10015-011-0897-9*~hmac=ef786ef1bfb6fd7008f423302de68e0531bbeea3404b35bb158fd3772cb19f3b|[7]]]