Title: MATLAB Solution For Data Acquisition and Signal Processing
1MATLAB Solution For Data Acquisition and Signal
Processing
???? ????? ??? josh_at_terasoft.com.tw
2Agenda
- MATLAB Solution For Test And Measurement
- Signal Processing Using MATLAB Toolbox
- MATLAB Graphical User Interface development
environment - Signal Processing Using SIMULINK
3The MathWorks Product Family
4RD Workflow
Data I/O
- Hardware,
- Files,
- Database,
Ideas
Compiler Toolbox
5- MATLAB Toolbox for data acquisition analysis
- Data Acquisition Toolbox
- Instrument Control Toolbox
- Image Acquisition Toolbox
6MATLAB Test Measurement Suite
- MATLAB
- For analysis and visualization
- Provides the foundation of the suite
- Serial port interface
- Data Acquisition Toolbox
- For communicating with industry standard data
acquisition hardware - Instrument Control Toolbox
- For controlling and communicating with GPIB and
VXI instruments - Additional application-specific toolboxes
- Signal processing, Statistics, Wavelet,
Communications, Neural Network, etc. - Sharing test results from MATLAB
- Data export, Report Generation
7Why Test Measurement tools for MATLAB?
- In the good old days
- Multiple people
- Test Engineers or technicians collecting data
- Engineers and scientist working with measured
data - Multiple software packages or environments
- Static access to data
- In todays world with the TM tools
- One engineer does it all - measurement and
analysis - Measurement can be both live and static
- One software package for a solution
- Dont need to learn multiple, distinct tools
8 Test Measurement Challenges Example
9 Framework of Test Measurement
Analog
Digital
10- MATLAB Toolbox for data acquisition analysis
- Data Acquisition Toolbox
- Instrument Control Toolbox
- Image Acquisition Toolbox
11A Tank Level Control Example
12Feature
- Get data into and out of MATLAB - Seamless
integration with MATLAB and MATLAB Toolboxes - Data logging
- Save data to other data type
- Use MATLAB function configuration your hardware
- Software oscilloscope softscope
- Create Yourself scope Guide
- Interface with industry standard data acquisition
devices
13 DAQ Support Hardware
- Advantech
- IOTech (Third Party Adaptor)
- Keithley Instruments
- Measurement Computing
- National Instruments
- United Electronic Industries (Third Party
Adaptor) - VXI Technologies
- Microsoft Windows compatible sound cards
14 Demo
Softscope
15Data Acquisition Session
16- MATLAB Toolbox for data acquisition analysis
- Data Acquisition Toolbox
- Instrument Control Toolbox
- Image Acquisition Toolbox
17Instrument Control Toolbox
18Instrument Control Toolbox
Graphical User Interfaces
Interfaces make it easy to communicate with
instruments
Analysis fromacquired data
19 Instrument Supported Hardware
- GPIB boards
- Agilent Technologies (formerly HP)
- Capital Equipment Corporation (CEC)
- ComputerBoards
- IOTech
- Keithley
- National Instruments
- VISA Interface
- National Instruments and Agilent support
- Includes serial port, GPIB, VXI and GPIB-VXI
support - Serial port
- Extended functionality (GUIs, Hardware
Information, etc) in toolbox
20Data Acquisition Session
Instrument Control Session
g gpib(ni,0,2) g.Timeout1
Second fopen(g) fprintf(g,
'MeasurementMeas1Value?') fscanf(g) ans
4.0399999619E0 query(g, 'MeasurementMeas1Va
lue?) ans 4.0400 fclose(g)
delete(g) clear s
ai analoginput(winsound)
addchannel(ai,1) set(ai, SampleRate,
44100) start(ai) datagetdata(ai) data
0.030 0.014 - 0.010 ...
delete(ai) clear ai
Create
Configure
Connect
Read/Write
Disconnect / clean-up
21Data Acquisition Toolbox
Instrument Control Toolbox
22- MATLAB Toolbox for data acquisition analysis
- Data Acquisition Toolbox
- Instrument Control Toolbox
- Image Acquisition Toolbox
23Image Processing Overview
24What is Image Processing?
1. Intro to Imaging in MATLAB
25The MathWorks Solution
- MATLAB, Image Processing Toolbox and Image
Acquisition Toolbox - Single environment for image analysis, algorithm
design, and deployment - Wide range of pre-built image processing
functions - Wide range of other toolboxes available in single
environment for multi-disciplinary tasks - Easy to verify, customize, and extend algorithms
- Multiple, seamless deployment options
26Scientific Imaging in MATLAB
MATLAB Image Acquisition Toolbox Image
Processing Toolbox
- A complete, integrated environment for the
Scientific Imaging community. - Includes built-in acquisition, visualization, and
analysis capabilities, as well as an intuitive
language for building algorithms and
applications. - Reduces development time
- Improves productivity
- Encourages creativity
27Image Acquisition Toolbox
28IAT Features
- Stream images and video directly into MATLAB from
hardware - Multi-vendor hardware support
- Provides access to configurable device properties
- Live video previewing
-
3. Features and Pricing
29Image Acquisition Toolbox
BEFORE
OUR SOLUTION
Hardware
Hardware
MATLAB
Software
Image
Image
MATLAB
Image Processing Toolbox
Image Processing Toolbox
30IAT Supported Hardware Video Devices
- Frame Grabbers (analog or digital)
- A plug-in circuit board that receives an image
from a camera or several cameras for use by the
PC. - IAT supports frame grabbers from MATROX and Data
Translation, National Instruments is not
supported - IAT supports any camera that works with supported
framegrabbers, including Cohu and Hamamatsu
cameras - Scientific Video Cameras (USB or FireWire)
- Higher performance and cost than WebCams, used
for industrial and research applications - Plugs directly into computer, doesnt use Frame
Grabber. - Sony and Hamamatsu are popular manufacturers
- IAT supports cameras that have WDM or VFW
drivers. - WebCam (USB or FireWire)
- Low-cost, consumer level video camera
- IAT supports WebCams that have WDM or VFW drivers
3. Features and Pricing
31IAT Supported Hardware Video Devices
- DV Camcorders
- Consumer grade digital video camcorders,
typically with FireWire interfaces - Canon, Sony, Panasonic, and JVC are popular
manufacturers - IAT supports camcorders that have WDM or VFW
drivers. - TV Tuner/Capture Boards
- Consumer grade devices that let you view
television on your computer or connect to VCRs
and DVD players - IAT does not record audio with the video
- IAT supports boards with WDM or VFW drivers.
3. Features and Pricing
Full list of supported hardware at
www.mathworks.com/products
32Agenda
- MATLAB Solution For Test And Measurement
- Signal Processing Using MATLAB Toolbox
- MATLAB Graphical User Interface development
environment - Signal Processing Using SIMULINK
33Signal Processing Overview
Spectral Analysis
Transforms
34Key Features
- Comprehensive function set of signal processing
and filter design methods - Tools for finite impulse response (FIR) and
infinite impulse response (IIR) digital filter
and analog filter design, analysis - Access to the most widely used transforms, such
as fast Fourier and discrete cosine - Tools for spectral analysis and statistical
signal processing - Routines for waveform generation, including a
Gaussian pulse generator, a periodic sinc
generator, and a pulse train generator - Functions for parametric time-series modeling
- Graphical user interfaces for designing,
analyzing, and visualizing signals, filters, and
windows
35DEMO Filter Design
- Infinite impulse response (IIR)
Could be unstable
- Finite impulse response (FIR) a1 Always Stable
- Using the command line or the GUI FDATool
36Filter Specification
Passband Ripple
Stopband Attenuation
Fs/2
Transition Band
Passband
Stopband
Transition Band
Passband
37Filter Design GUI
Analysis methods
Type method to use
Mode Selector
Filter specifications
38DEMO SPTool
39Agenda
- MATLAB Solution For Test And Measurement
- Signal Processing Using MATLAB Toolbox
- MATLAB Graphical User Interface development
environment - Signal Processing Using SIMULINK
40What Is GUIDE?
- provides a set of tools for creating graphical
user interfaces (GUIs). - These tools greatly simplify the process of
designing and building GUIs. - You can use the GUIDE tools to
- - Lay out the GUI
- - Program the GUI
-
41DEMO
42 43Guide --gt ActiveX
44Example
45DEMO
- Integrate With Data Acquisition In GUI
46Deployment Standalone
- Stand-alone applications can run even if MATLAB
is not installed on the end-user's system. - C and C shared libraries (dynamically linked
libraries, or DLLs, on Microsoft Windows). - These can be used without MATLAB on the
end-user's system. - You can recompile any of your existing M-files
that are compatible with MATLAB Release 14
products.
47Agenda
- MATLAB Solution For Test And Measurement
- Signal Processing Using MATLAB Toolbox
- MATLAB Graphical User Interface development
environment - Signal Processing Using SIMULINK
48Signal Processing Using SIMULINK
- Signal Processing Blockset
- Video and Image Processing Blockset
49Signal Processing Blockset 6.0.1
- Transforms Fast Fourier transform,
- discrete cosine transform,
- real and complex cepstrum.
- Filtering Digital filter design and
- implementation, adaptive,
- Quantizer A quantizer and uniform
- encoder and decoder.
- Operations Convolution, down sample,
- integer delay, unwrap, zero pad,
- and window function.
- Statistics Correlation, maximum,
- mean, RMS.
- Signal Source and Sink.
-
-
50Application AM modulation
- yKm(1acos (2pi(1000)t))cos (2pi(10000)t)
51Application Filtering
Band pass filter
To Audio output device
52Signal Processing Using SIMULINK
- Signal Processing Blockset
- Video and Image Processing Blockset
53Video and Image Processing Blockset
- in floating-point, integer, and fixed-point data
types - multimedia file input/output (I/O)
- 2-D filters, 2-D transforms, and geometric
transformation - standard color video and image conversion
techniques, including color space conversion and
chromaresampling - image analysis and enhancement algorithms, such
as edge detection, thresholding, morphology,
statistics, and compositing - automatically generate ANSI/ISO C code
54Application Video Sharpening
h1 0 -1 0 -1 5 -1 0 -1 0
Special Filter h1fspecial(unsharp,0)
55Application Video Sharpening
????
??????
????
???????
???????????
56 Support Information
???? Terasoft, Inc. ?? http//www.terasoft.com.t
w http//www.mathworks.com ????
(03)611-5678
support_at_terasoft.com.tw