4-july-data analysis and mathematical modelling using matlab

37
1 © 2013 The MathWorks, Inc. Design and Analysis of Systems using MATLAB & Simulink 4 th July, 2013 Chennai

Upload: chmscem

Post on 29-Oct-2015

59 views

Category:

Documents


3 download

DESCRIPTION

Very good information recent matlab updations. its a seminar material given by matlab

TRANSCRIPT

Page 1: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

1© 2013 The MathWorks, Inc.

Design and Analysis of Systems using MATLAB & Simulink

4th July, 2013

Chennai

Page 2: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

2

MathWorks Team Introduction

U. M. Sundar

Manoop Kunhambu

WadirajPuranik

Amit Doshi

Page 3: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

3

AgendaTime Agenda

10:00 AM – 10:10 AM Welcome Address

10.10 AM – 10:40 AM Key Note Customer Presentation: “Modeling, Simulation & Analysis of induction motor drive using MATLAB/Simulink” – Dr. Paramasivam, Danfoss

10.40 AM – 12:00 AM • Data Analysis using MATLAB• Data analysis• Visualizations• Application deployment

• Mathematical Modeling using MATLAB

12:00 PM – 12:15 PM Break

12:15 PM – 01:15 PM Dynamic System Modeling using Simulink• Modeling Systems Using Equations• Modeling Systems Using Test Data• Modeling Multi-domain Systems using Physical Modeling Tools

01:15 PM – 02:15 PM Lunch

02:15 PM – 03:15 PM Control System Design and Analysis Using MATLAB/Simulink• Interactive Tuning and Design of PID Controllers• Meeting Desired System Response Through Simulation Based Optimization Techniques• Overview of Real-Time Testing Using xPC Target Turnkey Solutions

03:15 PM – 3:30 PM Wrap Up

Page 4: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

4© 2013 The MathWorks, Inc.

Data Analysis and Mathematical Modeling using MATLAB

Amit DoshiApplication Engineer - Technical [email protected]

Page 5: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

5

Agenda

Agenda

1. Data Analysis using MATLAB• Data analysis• Visualizations• Application deployment

DEMO - I: Wind Data Analysis Tool for Site Selection

2. Mathematical Modeling using MATLAB• Derive and Solve Governing Equations• Optimize System-Design using MATLAB

DEMO - II: Gantry Crane Modeling

Page 6: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

6

What is Data Analysis?

Data Analysis is a PROCESS of inspecting, cleaning, transforming and/or modeling data with the GOAL of highlighting useful information and/or supporting decision making.

Some simple examples

According to ‘National Council of Applied Economic Research (NCAER)’ -2010 data240 mi household surveyed

Page 7: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

7

Data Analysis: Challenges

Diversified nature of data, missing data and data with errors

Time taken for creating analysis algorithms and documentation

Repetitive Analysis on multiple data files

Acquiring field data from files and get it into software

Page 8: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

8

Data Analysis Workflow

Reporting and Documentation

Outputs for Design

Deployment

Share

Files

Software

Instruments/Devices

Access

Code & Applications

Explore & Discover

Signal Analysis

& Visualization

Algorithm Development

Application Development

Automate

1 2 3

Page 9: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

9

Software tool

User’s guide

Goal

Site 1

Site 2

Site ..n

Demo 1: Wind Data Analysis Tool for Site Selection

Raw Data

Page 10: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

10

Software tool

User’s guide

Goal

Site 1

Site 2

Site ..n

Demo 1: Wind Data Analysis Tool for Site Selection

Raw Data

Import data Extract relevant data Remove error data Analyze the data Create a GUI Create .exe and .pdf

Tasks

Page 11: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

11

WindAnalysis.exe

Page 12: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

12

Import and Acquire Real Time Data

Import signals from multimedia files.wav, .wma, .aif, .aifc, .aiff, .mp3,.au, .sn.qt, .mov, .avi, .asf, .asx, .wmv, .mpg, .mp2, .mp4

Generate standard waveforms in MATLABSine, sawtooth, square, chirp, Gaussian pulse, …

Acquire signals from an instrument or deviceSignal analyzers, oscilloscopes, data acquisition boards, audio sound cards, …

Files

Software

Instruments/Devices

Access

Code & Applications

1

Page 13: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

13

Get Data from Hardware Devices

Data Acquisition ToolboxPlug-in data acquisition devices and sound cards

Instrument Control ToolboxInstruments and RS-232 serial devices

MATLABInterfaces for communicating with everything

Image Acquisition ToolboxImage capture devices

Vehicle Network ToolboxVector CAN bus interface devices

Page 14: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

14

Proximity Sensor

Torque Sensor

Strain gauge

DAQ card

Example 2

Example 1

Examples: Hardware Devices & MATLAB

Page 15: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

15

Analyze and Forecast using Data

Explore & Discover

Signal Analysis & Visualization

Algorithm Development

Application Development

Data AnalysisManipulate, preprocess, and manage data Analyze data quickly and accurately with prebuilt math and engineering functions

VisualizationBuilt-in graphics (2D,3D and Volviz), Interactive tools to annotate and customize graphics

Curve & Surface FittingPolynomial fits, Custom fits, Cubic Splines, …

Statistical AnalysisPDF, CDF, Regressors, Tree Baggers, Classifiers, Random number generators, univariate and multivariate analysis…

Neural NetworksNeural network fitting, training, testing,…

2

Page 16: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

16

Sharing Data Analysis Results

Reporting and Documentation

Outputs for Design

Deployment

Share Basic ReportingBasic Reporting in .pdf, ppt, doc, html, xml and LATEX formats

Customized ReportingCreate customized reports using MATLAB Report Genrator

Standalone ExecutableDeploy MATLAB Applications as Exe, .dll or .lib using MATLAB Compiler

Create Specific Format ExecutableDeploy MATLAB Applications as .jar, .net or as an excel macro using Builder products

3

Page 17: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

17

JavaExcel .NETWeb

Deploying Applications with MATLAB

Give MATLAB codeto other users

Share applicationswith end users whodo not need MATLAB– Stand-alone

executables

– Shared libraries

– Software components

.exe.dll.lib

MATLAB Compiler

MATLAB Builder NE

MATLABBuilder EX

MATLABBuilder JA

Explore & Discover ShareAccess

Page 18: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

18

MATLABDesktop

End-UserMachine

11

22

33Toolboxes

Deploying Applications with MATLAB

MATLAB Compiler

.exe

Page 19: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

19

Summary: Wind data analysis

ShareExplore and CreateData Access

Got the wind data into MATLAB

Extracted relevant data Removed the Excess data Analyzed the data Encapsulate algorithm in GUI

Created report using ‘publish’

Created MATLAB Application

Products Used: MATLAB MATLAB Compiler

Automate

Software tool

User’s guide

Page 20: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

20

Data Analysis: Challenges Addressed

Acquiring field data from files and get it into software

Diversified nature of data, missing data and data with errors

Time taken for creating analysis algorithms and documentation

Repetitive Analysis on multiple data files

Page 21: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

21

Agenda

Agenda

1. Data Analysis using MATLAB• Data analysis• Visualizations• Application deployment

DEMO : Wind Data Analysis Tool for site selection

2. Mathematical Modeling using MATLAB• Deriving and Solving Governing Equations• Optimizing the system design using MATLAB

DEMO: Gantry crane Modeling

Page 22: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

22

What is Mathematical Modeling?

Use of mathematical language to describe a system or process

Mathematical model

Input Output

Some simple examples

Lift on aircraft wing

2222

L

xLnWq to

l

where ..q = liftL = length of wingx = position along wingW = total aircraft weightn = load factor

Fixed deposit calculator

where ..

Page 23: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

23

Why develop mathematical models?

Forecast system behaviorPredict and gain insight into system behavior for various “what-if” scenarios– Enables critical decisions

– Reduces the need for testing

Optimize system behaviorIdentify parameters that optimizesystem performance

Design control systems Develop model to represent plantduring control system design

Page 24: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

24

Mathematical Modeling: Challenges

Getting mathematical concepts to a software model

Optimizing the mathematical model

Calculations take long time to converge

Documenting models for sharing across a whole organization

Page 25: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

25

Mathematical Modeling with MATLAB

Equations

Data

ShareAccess Explore & Create

Derivation & solving

Optimization

Reports

Applications

Page 26: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

26

Determine acceleration profile that minimizes payload swing

Demo 2: Modeling Gantry Crane

s25s4

s20s1

s20s1

:sConstraint

2

1

21

f

p

p

ppf

t

t

t

ttt

payload

Page 27: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

27

Demo 2: Modeling Gantry Crane

Page 28: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

28

Demo 2: Modeling Gantry Crane

Page 29: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

29

Approach towards Modeling Gantry Crane

Derive equations of motion

Solving equation of motion using ODE solver

Determine ideal acceleration profile– Constrained minimization

s25s4

s20s1

s20s1

:sConstraint

2

1

21

f

p

p

ppf

t

t

t

ttt

bang-coast-bang

Page 30: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

30

Determining the Acceleration Profile of Gantry Crane in

MATLAB

Page 31: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

31

Solving Big Problems

Large data set

Problem

Long running

Computationally intensive

Wait

Load data onto multiple machines that work together in parallel

Solutions

Run similar tasks on independent processors in parallel

Reduce sizeof problem

You could…

Page 32: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

32

Task 1 Task 2 Task 3 Task 4Task 1 Task 2 Task 3 Task 4

Task Parallel Applications

Time Time

TOOLBOXES

BLOCKSETS

Worker

Worker

Worker

Worker

Page 33: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

33

Summary: Modeling Gantry Crane

ShareExplore and Create

Equations

Access

Derivation & solving

Define equations in notebook

Equation derivation (symbolic)

Equation solving and optimization

Parallel computation

Share MATLAB files

Report

Optimization

Products Used MATLAB Symbolic Math Toolbox Optimization Toolbox Parallel Computing Toolbox

Page 34: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

34

Mathematical modeling: Challenges Addressed

Getting mathematical concepts to a software model

Optimizing the mathematical model

Documenting models for sharing across a whole organization

Calculations take long time to converge

Page 35: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

35

Modeling Higher Order Dynamic Systems

Reduced To 1st Order Differential EquationHigher Order Dynamic Systems

Page 36: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

36

Questions?

Page 37: 4-July-Data Analysis and Mathematical Modelling Using MATLAB

37

THANK YOU !!!