User Tools

Site Tools


lego_rip_prog_simulink

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lego_rip_prog_simulink [2016/04/18 00:31]
joaomatos
lego_rip_prog_simulink [2016/04/18 22:08]
joaomatos
Line 1: Line 1:
 +**Following this tutorial you will be able to make the system balance like this:**
 +
 +{{youtube>​CVWS4crfsck?​medium}}
 +----
 +
 +**Hardware And Software requirements:​**
 +
 +  You will need a NXT Brick and Matlab with Simulink version 2015 or higher. ​
 +
 +Follow the step-by-step tutorial to install this ADD-ON on your Matlab provided by MathWorks.
 +
 +[[http://​www.mathworks.com/​hardware-support/​lego-mindstorms-simulink.html?​refresh=true|Download and Tutorial Link]]
 +
 +
 +  * Following the tutorial , you will need to update the firmware of your Brick , just click next and it will auto update.However , many times an error can occur when updating for the first time. If your update fail and your brick don't want to turn on again and keep "​Clicking"​ , you will need to recover the Brick and then update again. This "​Clicking"​ is known as "Death Clicking Brick" or "​Clicking Syndrome"​ , and is totally recoverable. Just Hard -reset your Brick and then follow the installation tutorial again and it should work. 
 +
 +
 +{{::​simulink_files.rar| Simulink Files}}
 + 
 +To run the model , first run the script on matlab and then deploy the model to the hardware on the Simulink.
 +----
 +
 +
 **Part I) Getting the angles and calculating the velocities from the encoders: ** **Part I) Getting the angles and calculating the velocities from the encoders: **
  
Line 79: Line 102:
  
 {{::​finalripsim.jpg?​direct|}} {{::​finalripsim.jpg?​direct|}}
 +
 +
 +----
 +
 +**Part IV) Configurations and running the model**
 +
 +**1)** Click on the Simulation tab on the top of the window and then click on Model Configuration Parameters. Change the Solver tab and the Hardware implementation tab as shown in the pictures. The step size can be typed on the tab or can be a variable stored on your Matlab workspace (I'm using 0.010s).
 +
 +{{::​config_rip1.jpg?​direct|}}
 +{{::​config_rip2.jpg?​direct|}}
 +
 +**2)Running the Model**: The run the model , click on the Deploy to Hardware buttom , on the right top corner . If you did everything OK , the system will load a little bit and then your brick will start running the program.
 +
 +{{::​deployrip.jpg?​direct|}}
lego_rip_prog_simulink.txt ยท Last modified: 2016/04/18 22:08 by joaomatos