LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate EEG with artifacts

I want to simulate EEG and add artifacts to the signal. By using Biotoolkit I got the EEG signal without artifacts. In addition, I simulated 50Hz noise and white Gaussian noise and tried to add them to EEG. I do not want to add white noise by changing white noise amplitude in the configuration. How to add these noise? EEG.JPG

Đặng Huy Hoàng
0 Kudos
Message 1 of 5
(3,406 Views)

You can accomplish this by using a Compound Arithmetic function and doing a little bit of data type conversion. I'll include a VI snippet below. I used a Convert from Dynamic Data function and a Get Waveform Components function. Using this method you'll have to be careful what sampling rate and number of samples you set on your Generate Waveform function based on the size of data you're getting out of your Simulate EEG function. I hope this helps.

 

Adding Waveforms.png

Miles G.
National Instruments
Staff Applications Engineering Specialist
0 Kudos
Message 2 of 5
(3,351 Views)

Thank you ^^

Đặng Huy Hoàng
0 Kudos
Message 3 of 5
(3,342 Views)

I simulated the diagram like your image. When I saw the spectrum in the graph, I cound not see any affect of 50Hz noise.

Đặng Huy Hoàng
0 Kudos
Message 4 of 5
(3,333 Views)

How long is your generated Gaussian and EEG data? As it's written in the snippet I posted, the 50Hz noise will only last for one second or 256 points. The Sine Waveform VI I used generates a number of points based on the frequency and number of samples input to the sampling info input. The VI as written outputs 256 samples that were sampled from the 50 Hz waveform at a rate of 256 Hz. You will need to adjust this sampling info input based on the length of 50 Hz noise that you require.

Miles G.
National Instruments
Staff Applications Engineering Specialist
Message 5 of 5
(3,317 Views)