Você está na página 1de 29

1

2013 The MathWorks, Inc.


Low-Cost hardware connectivity
with Simulink
MATLAB-Day RWTH Aachen
Sebastian Gro
October 24th, 2013
2
LEGO Mindstorms NXT: a first demo
EDUCON 2013, Berlin, Germany
3
A first demo: the behind the scenes
45 lines of
MATLAB
code, only
4
Contents
What is low-cost hardware?
Hardware and Simulink: a great combo
Install, simulate, and enjoy: work-flow
Let us help you get started
5
What is low-cost hardware?
6
Simulink supported low-cost hardware
R2011b 2012a 2012b 2013a 2013b
BeagleBoard
Raspberry Pi
Gumstix Overo
ArduinoBoard
PandaBoard
LEGO Mindstorms
NXT
370 370
185 185
50 50
15 15
135 135
40 40
7
Hardware capabilities and features
Actuators:
servo motor {display, speaker}
Sensors:
light, color,
ultrasonic, sound,
accelerometer, gyro, etc.
Outputs:
PWM, digital,
serial, servo
Inputs:
analog, digital,
serial, servo
Microcontroller ATmega328 (AVR)
Flash Memory 32 KB
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
Microcontroller AT91SAM7S256 (ARM)
Flash Memory 256 KB
SRAM 64 KB
Operating freq. 55 MHz
8
Why low-cost hardware?
9
Learn hands-on
[retain knowledge]
1.
10
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
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
Dr. Enikov and students experimenting with the
aeropendulum in the lab.
Engaging Students in Hands-On
Control System Design:
University of Arizona
11
Get a taste of the
real world
[do it like the pros]
2.
12
Model-Based Design: first steps
Model Model Simulate Simulate
Generate code Generate code
Test on
hardware
Test on
hardware
Collect and
understand
requirements
Collect and
understand
requirements
13
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
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
Link to user story
The University of Toronto Institute for
Aerospace Studies reconfigurable robot
manipulator.
Reconfigurable Robots at
University of Toronto
14
Foster success
[by motivation]
3.
15
RWTH Aachen students working with a
Mindstorms NXT robot.
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
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
Link to user story
LEGO Mindstorms NXT at
RWTH Aachen: a success story
16
How-to? The work flow
17
What do you need to get it done, the bare essentials
Low-cost H/W (+ peripherals)
MATLAB and Simulink (+ toolboxes)
targetinstaller
targetupdater
Model, simulate, test, and enjoy
1 Get
2 Get
3 Run
4 Run
5 Code
18
Setting-up target hardware: quick and easy
>> targetinstaller
>> targetupdater
DONE
Installs all requirements
Updates firmware on target hardware
19
LEGO Mindstorms NXT Simulink Support Package
Inputs, sensors
Outputs, actuators
Examples
20
Raspberry Pi Simulink Support Package (13a)
Outputs, actuators
Inputs, sensors
Examples
21
Arduino Support Package
Examples
Inputs, sensors
Outputs, actuators
22
Arduino Ball-tracking demo
Control logic
implemented in
StateFlow
23
Arduino Ball-tracking demo: on-target code (controller)
PI controller running on
Arduino board
Input
Output
24
Ressources and support to
get started
25
Academia web page
26
Hardware Support ressources
27
MATLAB Central, File Exchange and other goodies
28
Support is available right next door
Sebastian Gross: sebastian.gross@mathworks.de
Tech support: +49-89-45235-6700 + press 4
Customer service: +49-89-45235-6700 + press 3
: MATLAB/Simulink in education
: specific technical questions
: and for everything else
29
Get low-cost H/W
today and start enjoying
with Simulink

Você também pode gostar