07-20-2010 10:37 AM
What is generating the square wave? Is it by code or by an external instrument? What will generate the sine wave, code or instrument? What kind of hardware is involved?
07-20-2010 10:53 AM - edited 07-20-2010 10:56 AM
Aargh! I hate it when I press the wrong button... Taking the fourier transform of a square wave gives you a sinc function.
07-20-2010 11:38 AM
Thank you guys. I am just using LabView to generate square wave and convert it to the sinc (sync).
Is there any function that will convert pulse into ECG ( Electro Cardio Gram) signal in labview?
07-20-2010 11:41 AM
No, you will have to write your own. Search this forum for ECG. I remember seeing several posts about it.
Once your code is somewhat written, we can help with problems you might have.
07-20-2010 12:11 PM
Thank you again. I have been given a simple project of converting square wave to look like ECG signal.
What I am thinking is adding sine wave to first 1/4 cycle, adding triangle wave to 2/3 cycle, and adding sine wave to rest 1/4 cycle. Do you think it's possible? How do I go about doing this?
07-20-2010 01:10 PM
While it's possible to do what you're describing, I don't think the results will be all that satisfactory. An ECG signal is a bit more complicated than that. You're probably going to be better off looking (i.e. Google) to see if you can find an ECG waveform simulator/generator.
07-20-2010 01:14 PM - edited 07-20-2010 01:18 PM
Use the wave generator funtions found in palette Signal Processing - Waveform Generation. There are sine and triangle waveform generating functions there. You can set the number of samples and sample rate such that it would generate a partial waveform. Then you use Get Waveform Components to get the Y values, concat the values, then use Build Waveform to build it back to a waveform. You will get a back to back output. In the following example, I used a sine and square wave because a sine and triangle were too close in appearance and you could not readily see the effect.
As Smercurio says, I don't think this is a very good representation of an EKG signal. That signal has P, QRS, and T waves. There is no sine wave. The waves are like triangle waves, so just put DC waveforms (0 amplitude square wave) ahead of and in between triangle waves for P, QRS, and T, followed by DC.
07-20-2010 02:22 PM
There is an ECG simulator module in the NI Biomedical Starter Kit. You can find more information about this free download by visiting our Biomedical User Group located at www.ni.com/biomedusers