Vous êtes sur la page 1sur 56

MATLAB Technology Tour 2011 Agenda

Time

Session Title

08:00

Optional Primer: An Overview of MATLAB and the MATLAB Product Family

08:20

Optional Primer: Introduction to Simulink for Modelling and Simulation

08:50

Welcome and Keynote Presentation: MathWorks from Research to Production

09:30

Streamline Your Data Analysis Workflow with MATLAB

10:00

Data Analysis and Modelling with MATLAB: A Practical Approach

10:30

Morning Tea

11:00

Guest Speaker: Industry Case Study

11:30

Model-Based Design Turns 10

12:00

Pathways to Production Taking MATLAB and Simulink Algorithms from Research and Design to
Production

12:30

Overview of Afternoon Sessions

12:35

Lunch
Workshops (held concurrently)

13:30

Automatically Converting MATLAB Code to C


Code

Data Analysis for Design with MATLAB

14:30

Model-Based Design for High-Integrity and


Business-Critical System Development

Using MATLAB for Signal Analysis

15:40

Closing Remarks, Next Steps, and Q&A

16:00

End
1

Using MATLAB for Signal Analysis

Daryl Ning
Applications Engineer

MathWorks Australia
Level 5, Tower 1
495 Victoria Ave
CHATSWOOD NSW 2067

2011 The MathWorks, Inc.2

Demo: Speech Recognition Application

Technical Computing Workflow


Speech Recognition Application
Access

Explore & Discover

Files
Data Analysis
& Modeling

Software

Algorithm
Development

Share
Reporting and
Documentation

Outputs for Design

Code & Applications

Hardware

Application
Development

Deployment

Automate
4

Agenda

Explore and Discover


Spectral Estimation
Filter Design

Application Specific Tools

Data Access
Data Acquisition
Communicating with Instruments

System Objects for Streaming Applications


Summary

Signal Analysis Examples

Physiological Signals
EEG, ECG, EMG

Geophysical signals
Seismic or tidal data

Communications
SDR, RADAR

Images or Video
Medical, Surveillance, Security

Audio
Speech, Music

Explore and Discover


General Signal Analysis Algorithms

Explore & Discover

Signal transforms
fft, dct, czt, hilbert, fwht,

Signal Analysis
& Visualization

Windowing methods
hamming, hann, bartlett, rectwin,
Algorithm
Development

Spectral estimation algorithms


periodogram, pwelch, msspectrum,

Application
Development

Statistical signal processing


xcorr, xcov, tfestimate, corrmtx,

Multirate operations
interp, decimate,resample,upfirdn,

Explore and Discover


Design and Implement Digital Filters

Explore & Discover

FIR Filters
fir1,fir2,fircls,firpm,intfilt,

Signal Analysis
& Visualization

IIR Filter Design Methods


butter,cheby1,cheby2,ellip,yulewalk,
Algorithm
Development

Filter Analysis and Implementation


fvtool,abs,angle,filter,cost,fftfilt,

Application
Development

Specialized Response Types


fdesign.notch,fdesign.octave,

Adaptive and Multirate Filters


adaptfilt.lms, adaptfilt.rls,
mfilt.firdecim, mfilt.iirdecim,
8

Demo: Remove noise from a Signal

Band-stop Filter

Interactive Tools
SPTOOL

10

Interactive Tools
FDATOOL*

*Some advanced features requires Filter Design HDL Coder, Fixed Point Toolbox and/or DSP System Toolbox.

11

Application Specific Tools

Communications System Toolbox


Image Processing Toolbox
Computer Vision System Toolbox
Phased Array System Toolbox (NEW)
RF Toolbox
Wavelet Toolbox

12

Ford Motor Company Develops and


Deploys Sound-Quality Metrics with
MATLAB
Challenge
Develop and deploy sound-quality metrics that correlate
well with subjective impressions of sound

Solution
Use the MATLAB product family to develop a sound
quality analysis tool and deploy SQ metrics to the
company and its worldwide suppliers

GUI for spark knock detector.

Results
Improved quality of Ford products
Development time reduced by six months
Source code control

Link to user story

13

Argonne National Laboratory Develops


Sensor for Chemical Agent Detection Using
MathWorks Tools
Challenge
Develop an instrument to reliably detect and identify
gaseous chemicals

The Smart Sensor Developer Kit.

Solution
Use MATLAB and related toolboxes to develop a highly
sensitive microsensor that can be incorporated into a
wide range of instruments

A scientist needs to focus on

Results

science and shouldnt have to

Measurement software code performance


increased by two orders of magnitude
Research and development time reduced from one
year to two weeks
SSDK recognized with prestigious award

recreate or debug math libraries

or support code. MathWorks


tools are proven, so researchers

can concentrate on new


algorithms and approaches.
Dr. Michael Vogt
Argonne National Laboratory
14

AT4 wireless Increases Internal Test


Coverage to Over 90% for LTE Physical
Layer Test Equipment Designs
Challenge
Develop test systems for LTE wireless equipment

AT4 wireless LTE layer 1 tester.

Solution
Use MATLAB and Simulink to design and simulate the
LTE physical layer, verify the FPGA implementation,
and analyze test results

Results
Internal test coverage increased to over 90%
Test harness reused throughout the project
life cycle
Development effort reduced by 2530%

MATLAB is a universal language that

makes it easy to exchange algorithms


and test results across our team. Our

physical layer model in MATLAB and


Simulink enabled us to better
understand the LTE specifications, and
Model-Based Design enabled us to
verify that our FPGA implementation

conformed to those specifications.


Francisco Javier Campos
AT4 wireless
Link to user story

15

Institute for Biodiagnostics, Canada


Develops an Imaging Tool for Assessing
Burn Injuries

Challenge
Determine the severity of burn injuries more quickly and
accurately

Images of a first-degree
burn, generated in three
wavelengths from a
spectroscopic camera.

Solution

Infrared point
spectroscopy
probe on the
tip of a finger.

Use MathWorks products to develop a tool to monitor


variations in skin hemodynamics at the site of the wound

Results
Effective, noninvasive tool for accessing burns
Flexible test environment
Accelerated algorithm development process

MathWorks tools allowed us


to thoroughly explore our data,
understand it, and put together
an optimal data analysis

approach.
Dr. Lorenzo Leonardi
Institute for Biognostics, Canada

16

Automating Digital Filter Implementation


for an Audio Codec at MediaTek

Challenge
Design audio codec filters to rigorous signal-to-noise ratio
and total harmonic distortion standards while minimizing
power consumption and silicon area

Filter architecture and segment of generated


code.

Solution
Design individual filters in MATLAB and Filter Design
Toolbox and use Filter Design HDL Coder to generate
synthesizable RTL code

Results
RTL development cycle reduced from three months
to less than two weeks
System modifications made in days, not weeks
Evaluation of multiple filter architectures accelerated

Tests of the initial chip run

uncovered no problems
whatsoever with the digital
portion of the audio codec. This
meant that our team was free to
lend a hand with the analog parts

of the design and with the rest of


the testing effort.
MediaTek Inc.

17

Summary
Explore and Discover

MATLAB speeds the development of signal processing


algorithms with built in tools for
Spectral Analysis

Filter Design
Filter Implementation

Extensive documentation and examples to help you get


started
Easy to use GUIs allow you to quickly explore your
data
A high level programming environment allows you to
perform more advanced and customised analysis
18

Agenda

Explore and Discover


Spectral Estimation
Filter Design: FDATOOL and Filterbuilder

Application Specific Tools

Data Access
Data Acquisition
Communicating with Instruments

System Objects for Streaming Applications


Summary

19

Import, Create or Acquire a Signal


Access
Files

Software

Import signals from multimedia files


(Audio) .wav, .wma, .aif, .aifc, .aiff, .mp3, .au, .sn
(Video) .qt, .mov, .avi, .asf, .asx, .wmv, .mpg, .mp2, .mp4

Generate standard waveforms in MATLAB


Sine, sawtooth, square, chirp, Gaussian pulse,

Code & Applications

Instruments/Devices

Acquire signals from an instrument or device


Signal analyzers, oscilloscopes, data acquisition boards,
audio sound cards,

20

MATLAB Connects to your Hardware Devices


Instrument Control Toolbox
Instruments and RS-232
serial devices

Data Acquisition Toolbox


Plug-in data acquisition devices
and sound cards
Image Acquisition Toolbox
Image capture devices

MATLAB
Interfaces for communicating
with everything
21

Demonstration Setup

GPIB Control Commands

Analog Waveform

Windows Sound
Card (A/D)

Agilent 33120A
Arbitrary Waveform
Generator
22

Demonstration Part 1:
Working with an Agilent Arbitrary Waveform Generator

fwrite(obj, TRIG:MAI:EDGE:SLO RIS);


set(obj, TriggerSlope, Rising);
23

Demonstration Part 2:
Acquiring Data with the Data Acquisition Toolbox

24

Instrument Control Toolbox


Control and communicate with scientific instruments

Integrate instruments into


MATLAB applications and
Simulink models
Interactive tool for detecting and
controlling instruments
Automatic code generation for
faster and easier implementation
Support for IVI, VXIplug&play,
and MATLAB instrument drivers
Support for common
communication protocols
25

Instrument Control Toolbox


Communication Protocols

GPIB Boards
Agilent Technologies
CONTEC
Keithley
National Instruments

Capital Equipment Corporation (CEC)


IOTech
Measurement Computing
ICS Electronics

VISA Interface (includes Serial, GPIB, VXI, GPIB-VXI, TCP/IP, USB)


Agilent
Rohde & Schwarz

National Instruments
Tektronix

Network Protocols
TCP/IP and UDP

Serial Port (core functionality in MATLAB)


RS-232, RS-422, RS-485
Expanded capability with Instrument Control Toolbox

For a full listing, visit: www.mathworks.com/products/instrument


26

Instrument Control Toolbox


Instrument Drivers

Industry-standard instrument drivers


LAN eXtensions for Instrumentation (LXI)

Interchangeable Virtual Instrument (IVI) drivers


VXIplug&play drivers

Several hundred supported instruments


Drivers available through the instrument vendor

Instrument drivers do not require knowledge of lowlevel commands


fwrite(obj, TRIG:MAI:EDGE:SLO RIS);
set(obj, TriggerSlope, Rising);
27

Instrument Control Toolbox


Instrument Drivers

MATLAB Instrument
Driver

Vendor Instrument
Driver
(IVI or VXIplug&play)

Automatically create MATLAB instrument driver for vendors


driver
Customize MATLAB driver to extend or enhance vendors driver
Create custom MATLAB driver for any instrument
MATLAB instrument drivers available at:
www.mathworks.com/products/instrument/drivers
28

Data Acquisition Toolbox


Acquire and output data from data acquisition boards

Immediately analyze live or


acquired data in MATLAB and
Simulink
Configure hardware without
leaving MATLAB
Incorporate custom analysis into
PC-based digital oscilloscope
Ability to do one-shot or
continuous acquisition
Support multiple data acquisition
devices and vendors

29

Data Acquisition Toolbox


Supported Hardware

Acqiris*
ADLINK*
Agilent*
Advantech
CONTEC*
Data Translation*
g.tec*

IOTech*
Keithley
Measurement Computing (MCC)
National Instruments
Ono Sokki*
United Electronic Industries*
VXI Technology

Any PC compatible sound card (AI, AO)


Parallel Port (DIO)

* Denotes that the hardware manufacturer made the investment to provide this support
For a full support listing, visit: www.mathworks.com.au/products/daq

30

Image Acquisition Toolbox


Acquire images and video from industry-standard hardware

Stream images and video


directly into MATLAB
Configure device properties
Background image acquisition
Live video previewing
Support for multiple hardware
vendors

31

Image Acquisition Toolbox


Supported Hardware

Frame grabbers
Matrox Imaging
Data Translation
DALSA Coreco
National Instruments

Digital cameras
Hamamatsu
Qimaging
DCAM-compatible cameras (IIDC 1394-based digital camera
specification)

Windows video devices


Windows Driver Model (WDM) or Video For Windows (VFW) drivers

Full listing available at www.mathworks.com/products/imaq


32

OPC Toolbox
Connect MATLAB And Simulink applications to OPC servers.

The OPCTool GUI enables easy


browsing of a server namespace,
configuring objects, and reading
and writing data.

The OPC Blockset library lets


you communicate data directly
to and from Simulink and your
process system.

33

Vehicle Network Toolbox


Send/Receive CAN packets directly from MATLAB or Simulink

Functions for Tx/Rx of CAN packets


Functions for encoding, decoding,
filtering and logging of CAN messages
Communication blocks for connecting
a CAN bus to a Simulink model
Message traffic GUI for visualising live
CAN network traffic
Support for Vector interface hardware
and Vector CAN database (.dbc) files

34

Newport Corporation uses MATLAB to validate positional


accuracy of motion control devices used for microchip
fabrication

Because we use the


Instrument Control and Data

Acquisition Toolboxes, all the

Software used:
MATLAB
Data Acquisition
Toolbox
Instrument Control
Toolbox

test data is in MATLAB, and


I can obtain the results
immediately . MathWorks
tools saved us hundreds of

hours of testing time.


Reed Farrar

Newport Corporation

35

Summary
Data Access

MATLAB connects to hardware and instruments


Control instruments directly from MATLAB
Acquire live signals directly into MATLAB

Data access and exploration can be integrated into one


environment
No need to pipeline data between different software
applications
A more streamlined workflow

36

Agenda

Explore and Discover


Spectral Estimation
Filter Design: FDATOOL and Filterbuilder

Application Specific Tools

Data Access
Data Acquisition
Communicating with Instruments

System Objects for Streaming Applications


Summary

37

Introducing System Objects

System objects are MATLAB objects for time-based and


data-driven algorithms, sources, and sinks

System objects make stream processing in MATLAB much


easier

Advantages of system objects over MATLAB functions:


Automatically manage state information
Manage data indexing

Implicit data buffering

38

Batch Processing
Load the entire data set and process it all at once

MATLAB

Data
Files

Memory
Signal
Processing
Algorithm

39

Batch Processing
Loads entire dataset
into workspace

[audio, Fs] = wavread('dspafxf_8000.wav');


filtCoeff = fir1(40, 0.8,low');
audio_filt = filter(filtCoeff, 1, audio);
wavplay(audio_filt, Fs);
Requires entire dataset to play audio

40

Stream Processing
Load a frame of the signal and process it before moving
on to the next frame

MATLAB

Stream
Source

Memory

Stream
Processing

41

Traditional Stream Processing in MATLAB


%% Streaming the MATLAB way
% set up initializations
filename = 'dspafxf_8000.wav';
Fs = 8000;
info = mmfileinfo(filename);
num_samples = info.Duration*Fs;
frame_size = 40;
filtCoeff = fir1(40, 0.8,low');
filtState = zeros(1,numel(filtCoeff)-1);
output = zeros(1,num_samples);

More code than in batch


processing example

Explicit state management

Explicit indexing
%% Processing in the loop
index= 1;
while index < (num_samples-frame_size+1)
data = wavread(filename,[index index+frame_size-1]);
[datafilt,filtState] = filter(filtCoeff,1,data,filtState);
output(index:index+frame_size-1) = datafilt;
index = index + frame_size;
end
wavplay(output,Fs);
Need to maintain output buffer
42

System Objects Make Stream Processing


Easier
Initialize objects
% set up initializations
filename = 'dspafxf_8000.wav';
hAudio = dsp.AudioFileReader(filename, ...
'SamplesPerFrame',40,OutputDataType','double');
hFilt = dsp.DigitalFilter(
TransferFunction, 'FIR (all zeros),
Numerator, fir1(40, 0.8,low');
hPlayer = dsp.AudioPlayer('SampleRate', 8000);
%% Processing in the loop
while ~isDone(hAudio)
data
= step(hAudio);
datafilt = step(hFilt, data);
step(hPlayer, datafilt);
end

In-the-loop code is much simpler


Implicit states and indexing
Audio player runs in-the-loop

43

Demo: Noise Cancellation with an Adaptive


LMS Filter
Noisy signal

d(n)

s(n) + z(n)

+
Z(n)
Correlated
to noise

Adaptive
filter

Adapting
algorithm

y(n)

Clean
signal

e(n)

d(n) y(n)

For details, see "Adaptive Filter Theory", 3rd Ed. by S. Haykin, Prentice-Hall 1996.
44

Working with System Objects


Examples from the DSP Systems Toolbox

Signal processing System objects

dsp.<objectname>

Eg. Digital filter System object

dsp.DigitalFilter

Create a System object with


default parameters

hFilt = dsp.DigitalFilter

Query object parameters and


methods

get(hFilt, Property Name)


methods(hFilt)

Example method step:

data_out = step(hFilt, data_in)

Use the step method to execute the


algorithm in a loop
45

Where Can I Find System Objects?

DSP System Toolbox


Previously the Signal Processing Blockset

Communications System Toolbox


Previously the Communications Toolbox and Communications
Blockset (now combined into a single toolbox)

Computer Vision System Toolbox


Previously the Video and Image Processing Blockset

Phased Array System Toolbox


Brand new to R2011a!

46

Summary
System Objects for Streaming Applications

System Objects make stream processing in MATLAB


much easier

System Objects retain state information


No need to manually track indices and maintain buffers
MATLAB in the loop code becomes simpler

You dont need to be an expert in object oriented


programming to use System Objects

47

Agenda

Explore and Discover


Spectral Estimation
Filter Design: FDATOOL and Filterbuilder

Application Specific Tools

Data Access
Data Acquisition
Communicating with Instruments

System Objects for Streaming Applications


Summary

48

Technical Computing Workflow


Access

Explore & Discover

Files
Data Analysis
& Modeling

Software

Algorithm
Development

Share
Reporting and
Documentation

Outputs for Design

Code & Applications

Hardware

Application
Development

Deployment

Automate
49

Summary
Using MATLAB for Signal Analysis

MATLAB is a powerful environment for design and simulation


of signal processing algorithms

Signal analysis and visualization tools

Signal processing operations and algorithms

Digital filter design and implementation

Interfaces with hardware and instruments

Stream processing techniques with system objects

Application specific tools for Communications, Image/Video

Processing, RF, and Phased Array systems

50

Further Information

DSP Application Page:


http://www.mathworks.com.au/dsp/

Technical Literature:
http://www.mathworks.com.au/dsp/technicalliterature.html

MathWorks Australia Pty Ltd


Level 5, Tower 1

Email: info@mathworks.com.au
Phone: 02 8669 4700

495 Victoria Ave


CHATSWOOD NSW 2067

Fax: 02 8669 4700


Web: www.mathworks.com.au

51

Upcoming Training in Melbourne


http://www.mathworks.com.au/services/training/schedule.html
Jun

22 24 MATLAB Fundamentals
27
MATLAB for Data Processing and Visualisation
28
MATLAB Programming Techniques
29
MATLAB for Building Graphical User Interfaces

Aug

2 4 MATLAB Fundamentals
18 19 Signal Processing with MATLAB
22 23 Simulink for System and Algorithm Modelling

Interested in an on-site course? Let us know.


52

Upcoming Training in Sydney


http://www.mathworks.com.au/services/training/schedule.html
Jun

21 23 MATLAB Fundamentals for Financial Applications


28 29 Parallel Computing with MATLAB

Jul

20
Interfacing MATLAB with C Code
26 28 MATLAB Fundamentals

Aug

15 16 Signal Processing with MATLAB

Interested in an on-site course? Let us know.


53

Upcoming Training in Brisbane


http://www.mathworks.com.au/services/training/schedule.html
Sep

20
21
22

MATLAB for Data Processing and Visualisation


MATLAB Programming Techniques
MATLAB for Building Graphical User Interfaces

Oct

25 27 MATLAB Fundamentals

Interested in an on-site course? Let us know.


54

Upcoming Training in Adelaide


http://www.mathworks.com.au/services/training/schedule.html
Jun

15 17 MATLAB Fundamentals

Aug

9 10 Simulink for System and Algorithm Modelling

Sep

68

MATLAB Fundamentals

Interested in an on-site course? Let us know.

55

Upcoming Training in Perth


http://www.mathworks.com.au/services/training/schedule.html
Aug

30
31

MATLAB for Data Processing and Visualisation


MATLAB Programming Techniques

Sep

MATLAB for Building Graphical User Interfaces

Interested in an on-site course? Let us know.

56

Vous aimerez peut-être aussi