Building a Simulink model for real-time analysis V1.15.00. Copyright g.tec medical engineering GmbH

Similar documents
P300 Spelling Device with g.usbamp and Simulink V Copyright 2012 g.tec medical engineering GmbH

Lab 3: Introduction to Data Acquisition Cards

Manual. Sealer Monitor Software. Version

User s Guide DDS-3X25 USB ARBITRARY FUNCTION GENERATOR

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

Work with Arduino Hardware

OPERATION MANUAL. MV-410RGB Layout Editor. Version 2.1- higher

Type-D EEG System for Regular EEG Clinic

ebus Player Quick Start Guide

Plena Voice Alarm System. Software Manual Configuration Software

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

OPTOFORCE DATA VISUALIZATION 3D

ADINSTRUMENTS. making science easier. LabChart 7. Student Quick Reference Guide

ECONseries Low Cost USB DAQ

Analatom, Inc., 3210 Scott Blvd., Santa Clara, CA Phone: (408) Fax: (408)

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

Data Logging Software and Cable Bundle Model DL-SC3 User Manual. Overview

Introduction to Simulink

Dash 8Xe / Dash 8X Data Acquisition Recorder

NVMS User Manual

MPC 4. Machinery Protection Card Type MPC 4 FEATURES. Continuous on-line Machinery Protection Card

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

STIM202 Evaluation Kit

SUMMARY. Additional Digital/Software filters are included in Chart and filter the data after it has been sampled and recorded by the PowerLab.

Case study: how to use cutoff conditions in a FRA frequency scan?

Transmitter Interface Program

RADview/TDM. Element Management System for TDM Applications Optimux-T RAD Data Communications Publication 06/05

BASLER ACE QUICK INSTALLATION GUIDE

Dash 18X / Dash 18 Data Acquisition Recorder

Manual Software SPECTRO3-MONITORING V5.0

Universal Simple Control, USC-1

Dials & Gauges Blockset

Data Acquisition Basics Lab

Software version 1.1 Document version 1.0

Page 1 S5.5 Monitoring Software Manual Rev 1.2 for Software Ver 1.0

WaveVision 5 Software

Scan Software. This section lists and describes the software and hardware required to run Scan.

Chapter I Model801, Model802 Functions and Features

User guide TSL2771 EVM / TMD2771 EVM. TSL2771/TMD2771 Light-to-Digital Proximity Detector/Ambient Light Sensor

MH - Gesellschaft für Hardware/Software mbh

DAS202Tools v1.0.0 for DAS202 Operating Manual

Quick Start Using DASYLab with your Measurement Computing USB device

SA-9600 Surface Area Software Manual

WAVES. MultiRack SETUP GUIDE V9.80

EET 310 Programming Tools

Audiomedia III Installation Guide

Designing the Solution for Electrochemistry Potentiostat/Galvanostat І Battery Cycler І Fuel Cell Test Station І

LEN s.r.l. Via S. Andrea di Rovereto 33 c.s CHIAVARI (GE) Tel Fax mailto: len@len.it url: http//

QUICK INSTALLATION. MSX-E1516 Ethernet digital I/O system /2014

How To Run A Factory I/O On A Microsoft Gpu 2.5 (Sdk) On A Computer Or Microsoft Powerbook 2.3 (Powerpoint) On An Android Computer Or Macbook 2 (Powerstation) On

1 Synchronising Xsens Systems with Noraxon TeleMyo

Software User Guide UG-461

Real Time Monitor. A Real-Time Windows Operator Interface. DDE Compliant. (for remote data display)

Capacitive Touch Lab. Renesas Capacitive Touch Lab R8C/36T-A Family

AC Measurements Using the Oscilloscope and Multimeter by Mr. David Fritz

RLC Series Resonance

Health Monitoring Demo for ice40 Ultra Wearable Development Platform User Guide. UG103 Version 1.0, September 2015

Controllable Space Phaser. User Manual

Troubleshooting Tools to Diagnose or Report a Problem February 23, 2012

EVAL-UFDC-1/UFDC-1M-16

Trigno/Vicon System Integration

GV-Keyboard. User's Manual V2.0

Remote Client Program Web Client... 39

1. Installing The Monitoring Software

Video Tracking Software User s Manual. Version 1.0

DDX 7000 & Digital Partial Discharge Detectors FEATURES APPLICATIONS

Mobile Mapping. VZ-400 Conversion to a Mobile Platform Guide. By: Joshua I France. Riegl USA

NetClient software user manual

BrainMaster tm System Type 2E Module & BMT Software for Windows tm. Helpful Hints

Hands On ECG. Sean Hubber and Crystal Lu

FREQUENCY RESPONSE ANALYZERS

RFSPACE CLOUD-IQ #CONNECTED SOFTWARE DEFINED RADIO

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

Navios Quick Reference

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

1. Introduction Fixture exterior view Connecting the Robe Universal Interface Software update of the fixture...

ugrid Testbed. Rein in microgrid complexity. With ease.

User Manual CROMLAWATCH. Data Logging Software. Version 1.6. For use with Color Sensors CROMLAVIEW CR100 CROMLAVIEW CR200 CROMLAVIEW CR210

EMF16 and Model 201 Graphics Software for Win 98/NT/ME/2K/XP/Vista/Win7/Win8 and Win10

PropScope USB Oscilloscope

Multi Channel software

Parts List. Navigation

Qsync Install Qsync utility Login the NAS The address is :8080 bfsteelinc.info:8080

NVMS USER MANUAL. Version 2.1.0

Getting Started with IntelleView POS Administrator Software

TF5 / TF3 / TF1 DIGITAL MIXING CONSOLE

Procedure for updating Firmware of EZ4 W or ICC50 W

User Manual Gigabit Ethernet Vision Quick Start Guide

Remote Monitoring and Control of the R&S FSL with a Web Browser

1. Central Monitoring System Software

A Tutorial Introduction to Control Systems Development and Implementation with dspace

BIODEX ADDENDUM BIODEX EMG/ANALOG SIGNAL ACCESS CONFIGURATION UTILITY SOFTWARE FOR SYSTEM 3 REVISION 2 AND SYSTEM 4 DYNAMOMETERS

DDX 7000 & Digital Partial Discharge Detectors FEATURES APPLICATIONS

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

Manual Client Management Software HDR50-CMS

TouchKit Software User manual for Windows 7 Version:

Tutorial: Configuring GOOSE in MiCOM S1 Studio 1. Requirements

Creating a Project with PSoC Designer

Transcription:

g.tec medical engineering GmbH Sierningstrasse 14, A-4521 Schiedlberg Austria - Europe Tel.: (43)-7251-22240-0 Fax: (43)-7251-22240-39 office@gtec.at, http://www.gtec.at Building a Simulink model for real-time analysis V1.15.00 Copyright g.tec medical engineering GmbH

Content: Introduction to g.usbamp... 2 g.usbamp Highspeed Block... 3 Running g.usbamp Highspeed... 6 Creating a Simulink Model for Biosignal Acquisition... 9 Biosignal Acquisition and Visualization... 16 Viewing Data with g.bsanalyze... 20 MATLAB Plot Function... 20 Synchronization of Multiple g.usbamps... 22 Impedance Check... 25 Calibration... 28 Other Examples... 31

Introduction to g.usbamp g.usbamp is a multimodal biosignal amplifier for any type of electrophysiological signals like EEG, ECG, EOG, EMG, ECoG,... and external sensors. It has an integrated 24-bit ADC and a floating point DSP and can be connected directly to the PC via USB. The device is characterized by excellent signal quality and a very low noise level. Multiple units (16 channels each) can be stacked to build multichannel systems. A programming API is included and drivers for MATLAB are also available. It is a CE-certified, FDA listed medical device. g.usbamp comes with 16 analog input channels, one trigger channel which is scanned with the analog inputs, 8 digital inputs and 4 digital outputs. g.usbamp has 4 potential separated groups with 4 input channels each. Each group has its own reference and ground inputs. Highlights CE and FDA certified medical device for use in humans according to medical normative EN 60601-1 (IEC 60601-1) EEG, ECoG, ECG, EMG and EOG recording via USB 16 analog inputs with 24 Bit and a sampling frequency of up to 38400 Hz per channel Digital filtering of the biosignal data (DC - 2.4 khz) Over-sampling to achieve a high signal to noise ratio Simultaneous sample and hold for all channels Direct connection of electrodes with standard safety connectors or system connectors for a very fast electrode application can be used for recordings directly on the brain (ECoG) or heart (CF-System) on-line signal analysis under Simulink can be combined with g.bsanalyze for off-line biosignal analysis under MATLAB Building a Simulink model for real-time analysis v 1.15.00 2

g.usbamp Highspeed Block The g.usbamp Highspeed block provides a graphical interface to the g.usbamp hardware, which can be used under Simulink to specify the amplifier properties and to acquire the data. Description The g.usbamp block output signal provides the biosignal data. The data format is single (float32) and it is scaled in µv. If all analog input channels (16) and the trigger signal (1) are acquired the line width is 17. Use a Demux block to de-multiplex the channels. Dialog Box Building a Simulink model for real-time analysis v 1.15.00 3

Specify AMPLIFIER SETTINGS Common ground Common reference Serial number CHANNEL selection Sampling rate (Hz) Frame length check the editor box to connect a specific group to common ground check the editor box to connect a specific group to common reference enter the serial number of the amplifier check the analog input channels that should be acquired specify the sampling frequency of the g.usbamp in Hz specify the buffering block size Options Counter Trigger Slave Shortcut show a counter on channel 16 which is incremented with every block transmitted to the PC scan the digital trigger channel with the analog inputs. The trigger channel is shown as channel 17 if 16 analog channels are used. set the amplifier to slave mode if multiple units are used enable the shortcut input Mode Measure Test signal Analog output Amplitude Offset Frequency amplify the inputs and send the data to the PC apply internal test signal to all inputs NOTE: The test signal works for sampling rates equal or below 600 Hz generate a Square-, Sawtooth-, Sine- or Noise-signal as test signal specify the amplitude of the test signal (max: 245 mv) specify the offset of the test signal specify the frequency of the test signal Specify CHANNEL SETTINGS Bipolar Bandpass Notch perform a bipolar derivation between 2 input channels perform a digital bandpass filtering of the input channels perform a bandstop filtering to suppress the power line frequency of 50 Hz or 60 Hz Load Save Load an amplifier configuration Save the amplifier configuration Building a Simulink model for real-time analysis v 1.15.00 4

Perform the following steps: 1. Select the channels in the listbox that should be edited. Use the CTRL key or the Shift key to select multiple input channels. 2. Select the Bandpass filter HP: 0.5 / LP: 30 and press the apply button to assign the bandpass to the specific channel. The selection is shown in the listbox. 3. Select the 50 Hz Notch filter to suppress the power line interference at 50 Hz and then press the apply button 4. To perform a bipolar derivation between channels 1 and 2, select the first channel in the listbox. Then select channel 2 under Bipolar and press the apply button. The settings appear in the listbox. This configuration subtracts channel 2 from channel 1 and the bipolar derivation will be visible on channel 1. NOTE: Select 0 under Bipolar and assign it to the channel if no bipolar derivation should be performed 5. Use the Save button to store the configuration for the g.usbamp. The Load button allows you to import configurations. 6. Press OK to close the window Building a Simulink model for real-time analysis v 1.15.00 5

Running g.usbamp Highspeed To test the g.usbamp Highspeed configuration on your system, please perform the following example: 1. Start the MATLAB command window. See your MATLAB documentation if you are not sure how to do this. 2. Open the Simulink model by typing gusbampdemo1 into the MATLAB command window. This command starts up Simulink and creates the following window: The Simulink model contains a g.usbamp block that reads in the data from the amplifier over USB. 3. Switch g.usbamp on and connect it to one free USB port. The power LED on g.usbamp must be on. 4. Connect a sine wave generator to channel 1 of g.usbamp. The sine wave should have an amplitude of 100 µv. This can be done e.g. with g.siggen. Building a Simulink model for real-time analysis v 1.15.00 6

5. Double click on the g.usbamp block 6. Load the configuration file gusbampdemo1.cfg. The following window appears: 7. Select the correct Serial number of the connected amplifier and press the OK button 8. Start the model by pressing the Start button in the Simulink model Building a Simulink model for real-time analysis v 1.15.00 7

9. To view the signals, double click on the g.scope block. Click the button (per channel auto scaling) to zoom into the axis. Note that g.usbamp Highspeed reads in all biosignal data in µv. Channel 1 shows a 100 V signal with a frequency of 10 Hz provided by g.siggen. 10. Stop the model with the Stop button and close it: Building a Simulink model for real-time analysis v 1.15.00 8

Creating a Simulink Model for Biosignal Acquisition 1. To create a new Simulink model, click on the Simulink icon in the MATLAB window: or enter simulink into the MATLAB command window. The Simulink Library Browser opens: The Simulink Library Browser gives access to all Simulink based blocksets. 2. Scroll down to g.usbamp to show the biosignal data acquisition block. Building a Simulink model for real-time analysis v 1.15.00 9

3. Click the New model icon in the Simulink Library Browser: to open an empty Simulink model: 4. Click on the gusbamp block in the Simulink Library Browser and drag it into the new Simulink model 5. Open the Signal Management path under Signal Processing Blockset in the Simulink Library Browser and copy the Unbuffer block into the new model 6. From the g.tec Highspeed Library directory copy the g.scope block 7. From Sinks under Simulink copy the To File block 8. From Signal Attributes under Simulink copy the Data Type Conversion block Building a Simulink model for real-time analysis v 1.15.00 10

Now your model should look like this: 9. Double click on the gusbamp block, load the configuration gusbampdemo2.cfg and enter the serial number of your amplifier. Building a Simulink model for real-time analysis v 1.15.00 11

10. Double click on the To File block and enter the filename test.mat to store the data into variable y: Building a Simulink model for real-time analysis v 1.15.00 12

11. Double click on the Data Type Conversion block and change the Output data type mode to double because g.usbamp is acquiring the data as float32. Building a Simulink model for real-time analysis v 1.15.00 13

12. After configuring each block, perform the connections as shown below: Building a Simulink model for real-time analysis v 1.15.00 14

13. Click on the Simulation menu and select Configuration Parameters 14. Set the Stop time to inf and the Type under Solver options to Fixed-step. The Fixedstep size must be set to 1/256 because g.usbamp samples the data with 256 Hz. 15. Confirm the settings and close the window with OK 16. Switch g.usbamp on and connect it to one free USB port. The power LED on g.usbamp must be on. 17. Start the model: Building a Simulink model for real-time analysis v 1.15.00 15

Biosignal Acquisition and Visualization This section shows the configuration of g.usbamp Highspeed for the acquisition of an ECG channel. 1. Start the MATLAB command window. 2. Open the Simulink model by typing gusbampdemo3 into the MATLAB command window. This command starts up Simulink and creates the following window: Building a Simulink model for real-time analysis v 1.15.00 16

3. Double click on the gusbamp block and select only channel CH01. Assign a Bandpass filter with a HP of 0.1 Hz and a LP of 100 Hz. The sampling frequency should be 1200 Hz. Note: The settings can also be loaded from the configuration file gusbampdemo3.cfg 4. Double click on the To File block and enter Filename test.mat. The data is stored into the variable y. Building a Simulink model for real-time analysis v 1.15.00 17

5. Switch g.usbamp on and connect it to one free USB port. The power LED on g.usbamp must be on. 6. Connect your ECG electrodes to channel 1 7. Press the Start icon: Building a Simulink model for real-time analysis v 1.15.00 18

g.usbamp Highspeed reads in the data in µv. The ECG signal therefore has an amplitude of approximately 1-2 mv. Building a Simulink model for real-time analysis v 1.15.00 19

Viewing Data with g.bsanalyze 1. Start the biosignal processing toolbox g.bsanalyze and load the biosignal data file ekg.mat or the file test.mat that was recorded in the previous section into the Data Editor with the Load data function from the File menu 2. Enter the sampling frequency 1200 Hz The Data Editor shows the ECG channel. Use the sliders to scroll through the data-set. MATLAB Plot Function You can use the MATLAB plotting functions for the visualization of acquired data. After running gmobilabdemo3.mdl and logging data to the harddisk, perform the following steps: 1. Change to the directory where test.mat is stored and enter load test.mat in your MATLAB command line. Instead of test.mat, the file ekg.mat can also be used. 2. Type whos to investigate the variable y. The first row is a time vector and the second row is the acquired ECG data. Building a Simulink model for real-time analysis v 1.15.00 20

3. Enter plot(y(1,:),y(2:end,:)) to create the following window: Building a Simulink model for real-time analysis v 1.15.00 21

Synchronization of Multiple g.usbamps g.usbamp Highspeed can be used to acquire data from two g.usbamps. Perform the following steps: 1. Start the Simulink model gusbampsync from the MATLAB command line to open the following model: 2. Double click on g.usbamp and load the configuration file gusbampsyncmaster.cfg Building a Simulink model for real-time analysis v 1.15.00 22

3. Enter the Serial number of the MASTER device and connect the synchronization cable to the output SYNC OUT on the rear side of the device. 4. Double click on g.usbamp1, load the configuration file gusbampsyncslave.cfg and enter the Serial Number of the SLAVE device. Also, check the Slave box under Options. Connect the synchronization cable to the SYNC IN connector on the rear side of the amplifier. Building a Simulink model for real-time analysis v 1.15.00 23

5. Switch on both amplifiers and connect the MASTER to the USB port. Then connect the SLAVE to the USB port. 6. Press the Start icon: Start the Simulink model gusbampdemo5 from the MATLAB command line to open another example of g.usbamp synchronization (4 amplifiers). Building a Simulink model for real-time analysis v 1.15.00 24

Impedance Check g.usbamp has a build-in impedance check unit. To measure the electrode impedances, perform the following steps: 1. Start the Simulink model gusbampdemo4 from the MATLAB command line to open the model below: 2. Double click on g.usbamp and load the configuration file gusbampdemo4.cfg. Enter the Serial Number of your amplifier. 3. Double Click Impedance Check block. The following window will appear: The system creates a panel for each amplifier in the current model. The channels are labeled 1 to 16 and the references R1 to R4. If the corresponding toggle button is pressed, the electrode impedance is measured. You can use Select all to select all electrodes or Select none to deselect all electrodes. If Auto select is checked, the system will enable the electrodes selected in the configuration window of the amplifier. Building a Simulink model for real-time analysis v 1.15.00 25

4. Press Start to start the measurement. The label of the currently measured electrode is displayed in red. Impedance values are displayed next to the corresponding channel labels. Different colors indicate ranges of the impedance values: green yellow red blue Impedance < 5 kω Impedance in 5 to 7 kω Impedance in 7 to 100 kω Electrode not connected 5. The system starts measuring the electrode impedances of channels 1 through 16. At the end, the impedances of the reference electrodes are also measured. All impedances are measured against the common ground potential (all grounds of groups A to D are connected). The impedance is measured for 1 second for each channel with a 20 Hz signal. The impedance is shown in kω. For a good EEG recording, the values should be below 5 kω (green). 6. To stop the impedance measurement press Stop. Building a Simulink model for real-time analysis v 1.15.00 26

If you want to add the Impedance measurement facility to your model, type simulink in the MATLAB command line and select the g.usbamp library. Drag the Impedance Check block into your model: : Note: Any sensor or device has to be disconnected from the amplifier while electrode impedance is measured. Building a Simulink model for real-time analysis v 1.15.00 27

Calibration g.usbamp has a build-in calibration unit. Perform the following steps: 1. Start the Simulink model gusbampdemo4 from the MATLAB command line to open the model below: 2. Double click on g.usbamp and load the configuration file gusbampdemo4.cfg. Enter the Serial Number of your amplifier. Building a Simulink model for real-time analysis v 1.15.00 28

3. Double Click Calibration block. The following window will appear: 4. Press Start to perform the calibration and to get the Offset and Scaling values for each channel. 5. Inspect the Offset and Scaling values. If you want to perform some changes, use the editor boxes. 6. Press the Save button to store the calibration. Building a Simulink model for real-time analysis v 1.15.00 29

If you want to add the Calibration facility to your model, type simulink in the MATLAB command line and select the g.usbamp library. Drag the Calibration block into your model: Building a Simulink model for real-time analysis v 1.15.00 30

Other Examples g.usbamp Highspeed provides other useful examples. Type simulink in the MATLAB command line and select the g.usbamp library. Double click Examples: Brain Computer Interface starts a Simulink model with the driver block. Online ECG, Respiration starts a Simulink model that calculates the heart-rate, heart-rate variability and respiration rate. Brain Computer Interface starts a Simulink model that performs brain computer interface experiments. Building a Simulink model for real-time analysis v 1.15.00 31

Building a Simulink model for real-time analysis v 1.15.00 32