Anbindung Hardware an Simulink

Embed Size (px)

Citation preview

  • 8/10/2019 Anbindung Hardware an Simulink

    1/29

    1

    2013 The MathWorks, Inc.

    Low-Cost hardware connectivity

    with Simulink

    MATLAB-Day RWTH Aachen

    Sebastian GroOctober 24th, 2013

  • 8/10/2019 Anbindung Hardware an Simulink

    2/29

    2

    LEGO Mindstorms NXT: a first demo

    EDUCON 2013, Berlin, Germany

  • 8/10/2019 Anbindung Hardware an Simulink

    3/29

    3

    A first demo: the behind the scenes

    45 lines ofMATLAB

    code, only

  • 8/10/2019 Anbindung Hardware an Simulink

    4/29

    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

  • 8/10/2019 Anbindung Hardware an Simulink

    5/29

    5

    What is low-cost hardware?

  • 8/10/2019 Anbindung Hardware an Simulink

    6/29

    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

    5015

    15

    135

    135

    40

    40

  • 8/10/2019 Anbindung Hardware an Simulink

    7/29

    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 KBEEPROM 1 KB

    Clock Speed 16 MHz

    Microcontroller AT91SAM7S256 (ARM)

    Flash Memory 256 KB

    SRAM 64 KB

    Operating freq. 55 MHz

  • 8/10/2019 Anbindung Hardware an Simulink

    8/29

    8

    Why low-cost hardware?

  • 8/10/2019 Anbindung Hardware an Simulink

    9/29

    9

    Learn hands-on

    [retain knowledge]

    1.

  • 8/10/2019 Anbindung Hardware an Simulink

    10/29

    10

    Challenge

    Provide students with hands-on control system design

    experience while keeping down costs

    Solution

    Introduce a low-cost, portable laboratory modulebased 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. EnikovUniversity 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

  • 8/10/2019 Anbindung Hardware an Simulink

    11/29

    11

    Get a taste of the

    real world

    [do it like the pros]

    2.

  • 8/10/2019 Anbindung Hardware an Simulink

    12/29

    12

    Model-Based Design: first steps

    ModelModel SimulateSimulate

    Generate codeGenerate codeTest on

    hardware

    Test on

    hardware

    Collect andunderstand

    requirements

    Collect andunderstand

    requirements

  • 8/10/2019 Anbindung Hardware an Simulink

    13/29

    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 integratedenvironment 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 seethose designs in action.

    Dr. Reza Emami

    University of TorontoLink to user story

    The University of Toronto Institute for

    Aerospace Studies reconfigurable robot

    manipulator.

    Reconfigurable Robots at

    University of Toronto

  • 8/10/2019 Anbindung Hardware an Simulink

    14/29

    14

    Foster success

    [by motivation]

    3.

  • 8/10/2019 Anbindung Hardware an Simulink

    15/29

    15

    RWTH Aachen students working with a

    Mindstorms NXT robot.

    Challenge

    Enabling 1st 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 programrobots.

    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 couldcontinue 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

  • 8/10/2019 Anbindung Hardware an Simulink

    16/29

    16

    How-to? The work flow

  • 8/10/2019 Anbindung Hardware an Simulink

    17/29

    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

  • 8/10/2019 Anbindung Hardware an Simulink

    18/29

    18

    Setting-up target hardware: quick and easy

    >> targetinstaller

    >> targetupdater

    DONE

    Installs all requirements

    Updates firmware on target hardware

  • 8/10/2019 Anbindung Hardware an Simulink

    19/29

  • 8/10/2019 Anbindung Hardware an Simulink

    20/29

    20

    Raspberry Pi Simulink Support Package (13a)

    Outputs, actuators

    Inputs, sensors

    Examples

  • 8/10/2019 Anbindung Hardware an Simulink

    21/29

  • 8/10/2019 Anbindung Hardware an Simulink

    22/29

    22

    Arduino Ball-tracking demo

    Control logic

    implemented in

    StateFlow

  • 8/10/2019 Anbindung Hardware an Simulink

    23/29

  • 8/10/2019 Anbindung Hardware an Simulink

    24/29

  • 8/10/2019 Anbindung Hardware an Simulink

    25/29

    25

    Academia web page

  • 8/10/2019 Anbindung Hardware an Simulink

    26/29

    26

    Hardware Support ressources

  • 8/10/2019 Anbindung Hardware an Simulink

    27/29

    27

    MATLAB Central, File Exchange and other goodies

  • 8/10/2019 Anbindung Hardware an Simulink

    28/29

    28

    Support is available right next door

    Sebastian Gross: [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

  • 8/10/2019 Anbindung Hardware an Simulink

    29/29

    29

    Get low-cost H/W

    today and start enjoying

    with Simulink