From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

1. Simulating an EEG using the Biomedical Toolkit for LabVIEW 2012

Code and Documents

Attachment

Description

Introduction

 

This community example briefly looks at how to simulate EEG data in LabVIEW using the Biomedical Toolkit add-on.  The VI is included at the end of this document and makes use of both the Simulate EEG express VI and the EEG FFT Spectrum VI of the Biomedical Toolkit.  This example is the first in a series of example programs that make use of the toolkit to acquire biosignals in the real world.

 

Uses of simulating EEG data

 

Simulating signals is a good way to check the behavior of your program before acquiring real world data.  It is also a good measure of what sort of amplitudes and frequencies to expect when performing the acquisition with your own hardware.

 

The NI LabVIEW Biomedical Toolkit

 

The NI LabVIEW Biomedical Toolkit can be used for both educational and research related purposes and includes functions for Biosignal Acquisition, Biosignal Measurements, File I/O and Medical Image Processing.  With the Biomedical Toolkit, you can take EEG, ECG and EMG measurements easily and effectively and display their waveforms in LabVIEW.

 

Biomedical Toolkit LV.png

(Figure 1. Biosignal Measurements palette of the Biomedical Toolkit)

 

Coding in LabVIEW

 

The following image shows the coding used to display a simulated EEG waveform and perform an FFT on the data so that we can view it in the frequency domain.  Typical EEG frequencies range from 0-30 Hz, with expected amplitudes of 10 uV - 100 uV when measured from the scalp.

 

Simulated EEG 2012 Snippet.png

(Figure 2. LabVIEW snippet of Block Diagram coding for the Simulate EEG Example VI)

 

The following front panel view of the Simulated EEG Example VI demonstrates the type of EEG measurements that can be simulated using the Biomedical Toolkit express VI.

 

Simulated EEG Front Panel.png

(Figure 3. Front Panel view of the Simulate EEG Example VI, showing the waveform graph used to display the raw EEG data and the waveform chart used to display processed EEG data after FFT processing)

 

The Simulate EEG Express VI

 

Configuring the Simulate EEG express VI involves setting the the expected amplitude levels and simulated sample rate.  You can also set the frequency composition of the EEG data and preview the data before it is generated.  EEG data is actually a superposition of many biosignals, each with varying frequencies.  The expected observed frequencies when taking EEG measurements is determined by the electrodes placement on the scalp. One of the added advantages to using the Simulate EEG express VI is generating simulated 60 Hz noise, which is a major design consideration when working with EEG data.  Take a look at the following Configure Simulate EEG dialogue box to familiarize yourselves with the express VI set-up.

 

Configure Simulate EEG dialogue box.png

(Figure 4. Configuration Dialogue Box for the Simulate EEG express VI)

 

Simulating your own EEG data

 

All that is left for you to simulate your own EEG data is to ensure you download the Biomedical Toolkit from the National Instruments website:

 

LabVIEW Biomedical Toolkit Download Web Page

 

Then, you can try creating this simple program from scratch or you can download the attached VI - Enjoy!

 

Marshall B
Applications Engineer
National Instruments UK & Ireland

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
ravi8490
Member
Member
on

I am working on LabVIEW 2011 and attached VI is not compatible with 11.0 version..

Marshall_B
NI Employee (retired)
on

Unfortunately, the Biomedical Toolkit was only introduced in LabVIEW 2012.  If you have access to 2012, upgrade to the latest version and download the code.

Marshall B
Applications Engineer
National Instruments UK & Ireland
reema25
Member
Member
on

not able to properly install biomedical tool kit 2013 in 2012 . it says its installed but when i open ur file which u have created it gives me error regarding some input parameters... need help please asap. please reply on khannasarthak1992@gmail.com or reema.chatt@gmail.com