44
1 © 2015 The MathWorks, Inc. Developing Autonomous Systems with MATLAB and Simulink Vivek Raju

Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

1© 2015 The MathWorks, Inc.

Developing Autonomous Systems

with MATLAB and Simulink

Vivek Raju

Page 2: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

2

Challenges in Developing Autonomous System

Challenge 1: Understand the dynamics of the autonomous system and

design control algorithm

Challenge 2: Design vision, radar and perception algorithms

Challenge 3: Verify and Implement the algorithm on to a real hardware

Page 3: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

3

What are we doing today?

Page 4: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

4

Key Takeaway

Autonomous system design using MATLAB and

Simulink can help in :

Understanding the dynamics and develop the

control algorithm

Model aerodynamics, propulsion and motion

Design control algorithm in single environment

Design vision, radar, perception algorithms

Visualizing different sensor data

Develop and test sensor fusion and tracking algorithm

Implementing the algorithm on actual hardware

Test and verify algorithm on 3D simulators

Automatic C/C++ code generation on to actual hardware

Page 5: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

5

Aerial Autonomous System Development Workflow

Aerodynamics and

flight Control

Develop

perception and

planning

algorithm

Test and Refine in

Simulation

Test and Refine on

Real Robot

Challenge 1:

Understand the

dynamics and

design control

algorithm

Challenge 2:

Design vision, radar

and perception

algorithms

Challenge 3:

Verify and

Implement the

algorithm on to a

real hardware

Birds Eye View

Page 6: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

6

Data-Driven ModelingFirst Principles Modeling

Neural Networks(Neural Network

Toolbox)System

Identification(System Identification

Toolbox)

Modeling Approaches

Statistical Methods(Model Based

Calibration Toolbox)

Code(MATLAB)

Block Diagram(Simulink)

Modeling Language(Simscape language)

Symbolic Methods(Symbolic Math

Toolbox)

Physical Networks(Simscape and other

Physical Modeling

products)

Different Approaches for Modeling Dynamic

systems

Page 7: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

7

Aerodynamics and control design

Page 8: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

8

Supervisory control logic

Page 9: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

9

Quickly model the Airframe using Aerospace blocksets

Page 10: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

10

Design the flight control algorithm

Simulating plant and controller in one environment allows you to optimize

system-level performance

Plant

+u y

Controller

s1 s2

s3

Page 11: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

11

Automatic PID tuning

Use Simulink Control Design and the Control System Toolbox to automatically linearize the plant,

design and tune your PID controllers

+

-

controller

S1 S2

S3

Page 12: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

12

Quadcoptor –Flight Simulation Model

Page 13: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

13

Aerial Autonomous System Development Workflow

Aerodynamics and

flight Control

Develop

perception and

planning

algorithm

Test and Refine in

Simulation

Test and Refine on

Real Robot

Challenge 1:

Understand the

dynamics and

design control

algorithm

Challenge 2:

Design vision, radar

and perception

algorithms

Challenge 3:

Verify and

Implement the

algorithm on to a

real hardware

Birds Eye View

Page 14: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

14

Common Questions from Engineers Integrating Autonomous Systems

Target

How can I

verify performance

and establish

requirements?

How can I develop &

test sensor fusion and

tracking algorithms?

How can I

visualize my

sensor data?

Page 15: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

15

Test vehicle equipped with sensors

Radar

Lidar

Camera

Inertial

measurement

unit

EO/IR

Page 16: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

16

Tools to Visualize Multiple Types of Data

Birds Eye ViewVideo with Annotations

LiDAR & Point CloudsRADAR

Page 17: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

17

Custom Visualization & Apps

• Open and extensible framework

• Synchronize data from multiple sensor sources

Page 18: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

18

Visual Odometry?Manage Sensor data

Page 19: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

19

Detailed Session on Image Processing and Computer Vision

Page 20: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

20

Common Questions from Engineers Integrating Autonomous Systems

Target

How can I

verify performance

and establish

requirements?

How can I develop &

test sensor fusion and

tracking algorithms?

How can I

visualize my

sensor data?

Page 21: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

21

Sensor Fusion

Accurate

Measureable directly

Relatively Good

Available

Why Sensor Fusion?

Range

Speed

Angle Resolution

Object Classification

Camera

Poor

Estimated

Relatively Good

Available

Radar

Accurate

Measureable directly

Poor

Estimated

Example: Automated Ground Vehicle

Requires robust detection (low false positives)

for obstacle avoidance

– Needs classification of likely objects

– Needs accurate measurements (range & speed)

Page 22: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

22

Synthetic

data

Fusion & Tracking Algorithm Development Workflow

Logged

multi-sensor

data

Algorithm

Create new scenario or refine sensor model

Collect vehicle & lab data

Refine algorithm

yes

no

Expected

Behavior

C Code

Generate code

Integrate

with embedded

environment

Page 23: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

23

Tracking of multiple objects (or “targets”) with one or multiple

sensors (e.g. radar, EO/IR, Lidar)

Multi-object tracking

Global nearest-neighbor assignment

Kalman filtering

Motion and measurement models

Detection reporting

Page 24: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

24

Common Questions from Engineers Integrating Autonomous Systems

Target

How can I

verify performance

and establish

requirements?

How can I develop &

test sensor fusion and

tracking algorithms?

How can I

visualize my

sensor data?

Page 25: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

25

Synthetic

data

Fusion & Tracking Algorithm Development Workflow

Logged

multi-sensor

data

Algorithm

Create new scenario or refine sensor model

Collect vehicle & lab data

Refine algorithm

yes

no

Expected

Behavior

C Code

Generate code

Integrate

with embedded

environment

Page 26: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

26

Common Approaches to Synthesizing Test Data

“Buy It” Buying “Off the shelf” solutions

like Unreal, Unity, or other

simulators enable you to author

scenarios and synthesize sensor

data

“Build It” Building it yourself enables

you to control the level of

fidelity/complexity appropriate

for your application

If building for multiple users, it

is important to select an

approach which is scalable,

maintainable, and testable

Page 27: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

27

Scenario Generation in MathWorks Tools

Phased Array Multi-Target ScenarioAutonomous Driving Scenario

Robotics Simulation Scenario

Page 28: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

28

Aerial Autonomous System Development Workflow

Aerodynamics and

flight Control

Develop

perception and

planning

algorithm

Test and Refine in

Simulation

Test and Refine on

Real Robot

Challenge 1:

Understand the

dynamics and

design control

algorithm

Challenge 2:

Design vision, radar

and perception

algorithms

Challenge 3:

Verify and

Implement the

algorithm on to a

real hardware

Birds Eye View

Page 29: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

29

Examples of Hardware Implementation of Autonomous

Systems

Page 30: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

30

What is ROS (Robot Operating System)?

• An architecture for distributed inter-

process communication

• Packages for common algorithms

and drivers

• Multilanguage interface (C++,

Python, Lua, Java and MATLAB)

Page 31: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

31

Advantages of ROS – Connectivity to 3D Simulators

Planning

Localization Obstacle

avoidance

Global Map

Motion controlNODE NODE

NODE NODE

NODE

NODE

NODE

ROS: Communication framework and stack of libraries

ROS: Connectivity to 3D simulators

Page 32: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

32

Advantages of ROS – Connectivity to Hardware

Planning

Localization Obstacle

avoidance

Global Map

Motion controlNODE NODE

NODE NODE

NODE

LIDAR RADAR GPS/IMUCamera

NODE NODE

ROS: Communication framework and stack of libraries

ROS: Connectivity to hardware for autonomous systems

Page 33: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

33

ROSMATLAB Code

SM Models

Built-in

algorithms

ROS node

Simulation

environment

Networking

Code Generation

MATLAB on PC

Generate standalone ROS node from Simulink

What can be done with the Robotics System Toolbox?

Robot

Page 34: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

34

Aerial Autonomous System Development Workflow

Aerodynamics and

flight Control

Develop

perception and

planning

algorithm

Test and Refine in

Simulation

Test and Refine on

Real Robot

Challenge 1:

Understand the

dynamics and

design control

algorithm

Challenge 2:

Design vision, radar

and perception

algorithms

Challenge 3:

Verify and

Implement the

algorithm on to a

real hardware

Birds Eye View

Page 35: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

35

Quadrotor Motion Controller

Page 36: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

36

System Level Design with MATLAB, Simulink and ROS

ROS as Communication Framework Algorithm Design Independent of ROS

Page 37: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

37

Demo

Page 38: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

38

Key Takeaway

Autonomous system design using MATLAB and

Simulink can help in :

Understanding the dynamics and develop the

control algorithm

Model aerodynamics, propulsion and motion

Design control algorithm in single environment

Design vision, radar, perception algorithms

Visualizing different sensor data

Develop and test sensor fusion and tracking algorithm

Implementing the algorithm on actual hardware

Test and verify algorithm on 3D simulators

Automatic C/C++ code generation on to actual hardware

Page 39: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

39

Flexible delivery options:

Public training available worldwide

Onsite training with standard or

customized courses

Web-based training with live, interactive

instructor-led courses

Self-paced interactive online training

More than 30 course offerings:

Introductory and intermediate training on MATLAB, Simulink,

Stateflow, code generation, and Polyspace products

Specialized courses in control design, signal processing, parallel computing, code generation,

communications, financial analysis,

and other areas

Email: [email protected]

Page 40: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

40

Control System Design with MATLAB and Simulink This two-day course provides a general understanding of how to accelerate the design

process for closed-loop control systems using MATLAB® and Simulink®.

Topics include:

Control system design overview

System modeling

System analysis

Control design

Controller implementation

Page 41: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

41

Designing Robotics Algorithms in MATLAB This one-day course is for engineers designing mobile robotics algorithms for Robot Operating

System (ROS) enabled simulators and robots.

Topics include:

Listing the design workflows possible with Robotics System Toolbox™

Communicating with ROS and Gazebo

Building and testing mobile robotics algorithms

Designing algorithms for execution and data sharing

Page 42: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

42

Email: [email protected] URL: http://www.mathworks.in/services/training Phone: 080-6632-6000

MathWorks Training

Upcoming Public Trainings Dates Location

Image Processing with MATLAB May 24 – 25 Bangalore

Computer Vision with MATLAB May 26 Bangalore

Designing Robotics Algorithms in MATLAB Sept 28 Pune

Guaranteed to run

Page 43: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

43

Questions and Discussion

Page 44: Developing Autonomous Systems with MATLAB and Simulink€¦ · Public training available worldwide Onsite training with standard or customized courses Web-based training with live,

44

Speaker Details

Email: [email protected]

LinkedIn:https://www.linkedin.com/in/vivekraju87/

Mobile: +91-8971669718

Contact MathWorks India

Products/Training Enquiry Booth

Call: 080-6632-6000

Email: [email protected]

Your feedback is valued.

Please complete the feedback form provided to you.