Low-Cost hardware connectivity with Simulink MATLAB-Day RWTH Aachen Sebastian Groß October 24th, 2013 2013 The MathWorks, Inc. 1
LEGO Mindstorms NXT: a first demo EDUCON 2013, Berlin, Germany 2
A first demo: the behind the scenes 45 lines of MATLAB code, only 3
Contents What is low-cost hardware? Hardware and Simulink: a great combo Install, simulate, and enjoy: work-flow Let us help you get started 4
What is low-cost hardware? 5
Simulink supported low-cost hardware 50 15 BeagleBoard ArduinoBoard 40 Raspberry Pi R2011b 2012a 2012b 2013a 2013b Gumstix Overo LEGO Mindstorms NXT 370 PandaBoard 185 135 6
Hardware capabilities and features Microcontroller Flash Memory SRAM Operating freq. AT91SAM7S256 (ARM) 256 KB 64 KB 55 MHz Actuators: servo motor {display, speaker} Sensors: light, color, ultrasonic, sound, accelerometer, gyro, etc. Inputs: analog, digital, serial, servo Microcontroller Flash Memory SRAM EEPROM Clock Speed Outputs: PWM, digital, serial, servo ATmega328 (AVR) 32 KB 2 KB 1 KB 16 MHz 7
Why low-cost hardware? 8
1. Learn hands-on [retain knowledge] 9
Engaging Students in Hands-On Control System Design: University of Arizona Challenge Provide students with hands-on control system design experience while keeping down costs Solution Introduce a low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered Technical concepts better illustrated Transferable control design skills acquired Dr. Enikov and students experimenting with the aeropendulum in the lab. These experiences do not require expensive lab equipment. In fact, we have found that MATLAB, Simulink, and a simple low-cost device are all that is needed. Dr. Eniko T. Enikov University of Arizona Link to article 10
2. Get a taste of the real world [do it like the pro s] 11
Model-Based Design: first steps Collect and understand requirements Model Simulate Test on hardware Generate code 12
Reconfigurable Robots at University of Toronto Challenge Provide engineering students with a low-cost learning environment for studying the design and control of a variety of industrial robot manipulators Solution Use MATLAB and Simulink to develop an integrated environment for simulating, visualizing, and optimizing designs using a reconfigurable robot Results Students prepared for work in industry Complex optimizations automated Months of development time eliminated Link to user story The University of Toronto Institute for Aerospace Studies reconfigurable robot manipulator. With MATLAB and Simulink we developed a low-cost design and simulation environment that enables students to apply theoretical aspects of kinematics, dynamics, and controls of robot manipulators in a realistic way, optimize their designs, and see those designs in action. Dr. Reza Emami University of Toronto 13
3. Foster success [by motivation] 14
LEGO Mindstorms NXT at RWTH Aachen: a success story Challenge Enabling 1 st year students to apply theoretical concepts in math and signal processing in a hands-on experimental lab. Fostering soft skills by working in a team environment. Solution Use MATLAB and LEGO Mindstorm NXT to build and program robots. Results MATLAB programming skills rated high by students after course Motivation rated excellent to good by almost 90% of students Ability to link theoretical foundations to practical applications Link to user story RWTH Aachen students working with a Mindstorms NXT robot. This high level of motivation is reflected in the number of extra hours the students devoted to their projects. We knew we had achieved our objectives when students demanded that we set up a workshop so that they could continue working with the robots in their free time. Univ.-Professor Dr.-Ing. Til Aach RWTH Aachen University 15
How-to? The work flow 16
What do you need to get it done, the bare essentials 1 Get 2 Get Low-cost H/W (+ peripherals) MATLAB and Simulink (+ toolboxes) 3 Run 4 Run targetinstaller targetupdater 5 Code Model, simulate, test, and enjoy 17
Setting-up target hardware: quick and easy >> targetinstaller Installs all requirements >> targetupdater Updates firmware on target hardware DONE 18
LEGO Mindstorms NXT Simulink Support Package Inputs, sensors Examples Outputs, actuators 19
Raspberry Pi Simulink Support Package (13a) Inputs, sensors Outputs, actuators Examples 20
Arduino Support Package Inputs, sensors Outputs, actuators Examples 21
Arduino Ball-tracking demo Control logic implemented in StateFlow 22
Arduino Ball-tracking demo: on-target code (controller) PI controller running on Arduino board Input Output 23
Ressources and support to get started 24
Academia web page 25
Hardware Support ressources 26
MATLAB Central, File Exchange and other goodies 27
Support is available right next door : MATLAB/Simulink in education Sebastian Gross: sebastian.gross@mathworks.de : specific technical questions Tech support: +49-89-45235-6700 + press 4 : and for everything else Customer service: +49-89-45235-6700 + press 3 28
Get low-cost H/W today and start enjoying with Simulink 29