Table of Contents
Simulating the RIP project using CAD model and Simulink
Follow this simple tutorial to learn how to export your Lego assemblies using SolidWorks to Simulink. Simulink is a powerfull tool to develop and test your controller before you go to the actual project and start coding.
You can find a lot of useful things for this project under this kit: Kit for the RIP project
There is a Matlab script to run the LQR calculation and find the gains ( the derivation of the model is shown in the system modelling section). There is a folder including the complete building of the system . There is another folder that you will use to run the Simulink programs named Only Sensors building. There you will find Simulink programs to simulate only the balance , the swing-up and the balance , and a fuzzy logic controller.
How to export a SolidWorks Lego assembly into Simulink
Videos
You can use SolidWorks to build a virtual model of your project and get important data as Center of Gravity, Inertia and mass of your assembly.
You can test if you did the LQR calculation right , simulating only the pendulum balance:
You can test your swing-up algorithms and test your switch controller to see if the integration of your swing-up controller and the balance controller will work:
Also you can try new ways to control the balance , like using fuzzy logic controllers: