1 / 56

MATLAB Solution For Data Acquisition and Signal Processing

MATLAB Solution For Data Acquisition and Signal Processing. 鈦思科技 應用工程師 潘俊憲 josh@terasoft.com.tw. Agenda. MATLAB Solution For Test And Measurement Signal Processing Using MATLAB Toolbox MATLAB Graphical User Interface development environment Signal Processing Using SIMULINK.

vilina
Download Presentation

MATLAB Solution For Data Acquisition and Signal Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MATLAB Solution For Data Acquisition and Signal Processing 鈦思科技 應用工程師 潘俊憲 josh@terasoft.com.tw

  2. Agenda • MATLAB Solution For Test And Measurement • Signal Processing Using MATLAB Toolbox • MATLAB Graphical User Interface development environment • Signal Processing Using SIMULINK

  3. The MathWorks’ Product Family

  4. Test and Measurement Toolbox Signal Processing Toolbox Data Analysis, Modeling & Visualization Idea and Results Sharing Algorithm Development & Simulation Application Deployment Mathematical Modeling R&D Workflow Hardware, Files, Database, … Data I/O Ideas Compiler Toolbox

  5. MATLAB Toolbox for data acquisition & analysis • Data Acquisition Toolbox • Instrument Control Toolbox • Image Acquisition Toolbox

  6. MATLAB 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

  7. Why 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 today’s world with the T&M tools • One engineer does it all - measurement and analysis • Measurement can be both live and static • One software package for a solution • Don’t need to learn multiple, distinct tools

  8. Test & Measurement Challenges Example BEFORE: Standalone Data Acquisition Software File MATLAB MATLAB T&M SOLUTION: Integrated Test and Analysis MATLAB

  9. Data Acquisition Hardware (A/D, D/A, DIO) DataAcquisition 010101010101011 Physical Quantity System bus Sensor Microphone 0 1 1 0 1 Noise Serial, GPIB, TCP-IP Instrument Control Stand-Alone Instruments Framework of Test & Measurement Analog Digital

  10. MATLAB Toolbox for data acquisition & analysis • Data Acquisition Toolbox • Instrument Control Toolbox • Image Acquisition Toolbox

  11. Data Acquisition Hardware Sensor / Transducer Physical Quantity + - Actuator/Driver Tank Level A Tank Level Control Example

  12. Feature • 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. Sound Card Demo Softscope

  15. » ai = analoginput(‘winsound’); » addchannel(ai,1); » set(ai, ’SampleRate’, 44100); » start(ai) » data=getdata(ai) data = 0.030 0.014 - 0.010 ... » delete(ai) » clear ai Create Configure Connect Read/Write Disconnect / clean-up Data Acquisition Session

  16. MATLAB Toolbox for data acquisition & analysis • Data Acquisition Toolbox • Instrument Control Toolbox • Image Acquisition Toolbox

  17. Instrument Cable Communication Port Function Generator Digital Multimeter DC Power Supply Oscilloscope Spectrum Analyzer ... Commands / Responses Instrument Control Toolbox

  18. Instrument 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

  20. Instrument Control Session Data Acquisition Session » ai = analoginput(‘winsound’); » addchannel(ai,1); » set(ai, ’SampleRate’, 44100); » start(ai) » data=getdata(ai) data = 0.030 0.014 - 0.010 ... » delete(ai) » clear ai » g = gpib(’ni’,0,2); » g.Timeout=1; % Second » fopen(g) » fprintf(g, 'Measurement:Meas1:Value?') » fscanf(g) ans = 4.0399999619E0 » query(g, 'Measurement:Meas1:Value?’) ans = 4.0400 » fclose(g) » delete(g) » clear s Create Configure Connect Read/Write Disconnect / clean-up

  21. PC (Matlab) PC (Matlab) Serial port GPIB card VISA card DAQ H/W A/DDI D/ADO Instrument Plant Plant Data Acquisition Toolbox Instrument Control Toolbox

  22. MATLAB Toolbox for data acquisition & analysis • Data Acquisition Toolbox • Instrument Control Toolbox • Image Acquisition Toolbox

  23. Image Processing Overview

  24. 1. Enhancing images 2. Extracting information from images What is Image Processing? 1. Intro to Imaging in MATLAB

  25. The 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

  26. Scientific 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

  27. Image Acquisition Toolbox

  28. IAT 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

  29. Image Acquisition Toolbox BEFORE: OUR SOLUTION: Hardware Hardware MATLAB Software Image Image MATLAB Image Processing Toolbox Image Processing Toolbox

  30. IAT 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, doesn’t 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

  31. IAT 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

  32. Agenda • MATLAB Solution For Test And Measurement • Signal Processing Using MATLAB Toolbox • MATLAB Graphical User Interface development environment • Signal Processing Using SIMULINK

  33. Add Noise to Source Denoising Signal Source Signal Processing Overview Spectral Analysis Transforms

  34. Key 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

  35. DEMO : Filter Design • Infinite impulse response (IIR) Could be unstable • Finite impulse response (FIR) a=1 Always Stable • Using the command line or the GUI FDATool

  36. Filter Specification • Wp, Ws, Rp, Rs Passband Ripple Stopband Attenuation Fs/2 Passband Transition Band Stopband Passband Transition Band

  37. Filter Design GUI • >>FDATool Analysis methods Type & method to use Mode Selector Filter specifications

  38. DEMO : SPTool

  39. Agenda • MATLAB Solution For Test And Measurement • Signal Processing Using MATLAB Toolbox • MATLAB Graphical User Interface development environment • Signal Processing Using SIMULINK

  40. What 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

  41. DEMO : • Create an easy GUI :

  42. GUIDE Templates

  43. ActiveX Control Property Inspector Create Guide --> ActiveX

  44. Example >> GUI_activeX

  45. DEMO : • Integrate With Data Acquisition In GUI

  46. Deployment 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.

  47. Agenda • MATLAB Solution For Test And Measurement • Signal Processing Using MATLAB Toolbox • MATLAB Graphical User Interface development environment • Signal Processing Using SIMULINK

  48. Signal Processing Using SIMULINK • Signal Processing Blockset • Video and Image Processing Blockset

  49. Signal 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.

  50. Application : AM modulation • y=Km(1+a*cos (2*pi(1000)t))*cos (2*pi(10000)t)

More Related