Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory...
Transcript of Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory...
![Page 1: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/1.jpg)
1 © 2013 The MathWorks, Inc.
Anbindung von Low-Cost Hardware an Simulink leicht gemacht
MATLAB Expo Germany 2013 Dr. Mischa Kim July 2, 2013
![Page 2: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/2.jpg)
2
Contents
What is low-cost hardware?
Hardware and Simulink: a great combo
Install, simulate, and enjoy: work-flow
Let us help you get started
![Page 3: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/3.jpg)
3
A first demo: the “behind the scenes”
45 lines of code, only
![Page 4: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/4.jpg)
4
LEGO Mindstorms NXT: a first demo
EDUCON 2013, Berlin, Germany
![Page 5: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/5.jpg)
5
What is low-cost hardware?
![Page 6: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/6.jpg)
6
Simulink supported low-cost hardware
R2011b 2012a 2012b 2013a 2013b
BeagleBoard
Raspberry Pi
Gumstix Overo
ArduinoBoard
PandaBoard
LEGO Mindstorms NXT
€370 €185
€50
€15
€135
€40
![Page 7: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/7.jpg)
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
![Page 8: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/8.jpg)
8
The high-end solution: Real-time testing with xPC Target Turnkey
MathWorks Speedgoat Customer
Combines MathWorks design software with Speedgoat H/W
Offers a complete solution for real-time simulation and testing
Modellbasiertes Echtzeittesten und automatische Codegenerierung Richard Pfisterer
![Page 9: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/9.jpg)
9
Why low-cost hardware?
![Page 10: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/10.jpg)
10
Teach and learn hands-on [retain knowledge]
1.
![Page 11: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/11.jpg)
11
Basics: Easy does it (1995, Physik I)
![Page 12: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/12.jpg)
12
Challenge
Provide hands-on control system design experience
Solution
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
![Page 13: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/13.jpg)
13
Get students a taste of the “real world” [do it like the pro’s]
2.
![Page 14: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/14.jpg)
14
Model-Based Design with Simulink [and Stateflow]
Model Simulate
Generate code Test on
hardware
Collect and understand
requirements
Stateflow
![Page 15: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/15.jpg)
15
Challenge
Provide 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 to design 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
![Page 16: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/16.jpg)
16
Foster student success [by motivation]
3.
![Page 17: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/17.jpg)
17
What (really) matters [for success]?
Emotional Intelligence, Daniel Goleman, Bantam, July 1, 1996
Emotional Intelligence
Technical competences
and skills
Intelligence
Self-awareness and regulation
Motivation Empathy, Social skills
![Page 18: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/18.jpg)
18
No children were harmed in the making of this photograph
Emotional Intelligence: motivation
Research shows that – Intelligence is no guarantee for success
– Emotional intelligence (EI) is key for success
Motivation – Can be triggered extrinsically!
– Small change, huge impact (for students and their teachers)
– Watch and be amazed…
Emotional Intelligence, Daniel Goleman, Bantam, July 1, 1996
![Page 19: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/19.jpg)
19
Motivation and retention: educational trends
Retain the right students, on-time
Integrate spiraling curricula
![Page 20: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/20.jpg)
20
Challenge
Get 1st year students to apply theoretical concepts in math and signal processing in a hands-on experimental lab. Foster soft skills by working in team environment.
Solution
Use MATLAB and LEGO Mindstorm NXT to build and program robots.
Results
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.”
Professor
RWTH Aachen Link to user story
RWTH Aachen students working with a Mindstorms NXT robot.
LEGO Mindstorms NXT at RWTH Aachen: a success story
![Page 21: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/21.jpg)
21
How-to? The work flow
![Page 22: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/22.jpg)
22
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
Note: no code generation tools required
![Page 23: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/23.jpg)
23
Setting-up target hardware: quick and easy
>> targetinstaller
>> targetupdater
DONE…
Installs all required add-ons
Updates firmware on target hardware
![Page 24: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/24.jpg)
24
LEGO Mindstorms NXT Simulink Support Package
Inputs, sensors
Outputs, actuators
Examples
![Page 25: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/25.jpg)
25
Arduino Support Package
Examples
Inputs, sensors
Outputs, actuators
![Page 26: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/26.jpg)
26
Arduino Ball-tracking demo
Control logic implemented in
Stateflow
Top level code is running on host
machine
![Page 27: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/27.jpg)
27
Arduino Ball-tracking demo: on-target code (controller)
Input
Output
PI controller is running on Arduino board
![Page 28: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/28.jpg)
28
Why
low-cost H/W and Simulink?
![Page 29: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/29.jpg)
29
“No need, no ressources, no experience, …”
“No need” > There is simply no need
“No ressources” > Let us help you get started
“No experience” > Let us help you get started
![Page 30: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/30.jpg)
30
Ressources and support to get started
![Page 31: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/31.jpg)
31
MathWorks’ Academia web page
![Page 32: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/32.jpg)
32
Hardware Support ressources
![Page 33: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/33.jpg)
33
MATLAB Central, File Exchange and other goodies
![Page 34: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/34.jpg)
34
Student Version R2013a
MATLAB
Simulink
10 add-on products – Control System Toolbox
– Signal Processing Toolbox
– DSP System Toolbox
– Statistics Toolbox
– Optimization Toolbox
– Image Processing Toolbox
– Symbolic Math Toolbox
– Simulink Control Design
– Data Acquisition Toolbox
– Instrumentation Control Toolbox
€ 69
![Page 35: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/35.jpg)
35
Support is available right “next door”
Dr. Mischa Kim: [email protected]
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
![Page 36: Anbindung von Low-Cost Hardware an Simulink leicht gemacht€¦ · Low-cost, portable laboratory module based on MATLAB, Simulink, and an aeropendulum Results Equipment costs lowered](https://reader033.fdocuments.net/reader033/viewer/2022050517/5fa13b65b8c73351b52926e7/html5/thumbnails/36.jpg)
36
Get low-cost H/W
today and start enjoying
with Simulink