LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert square wave to sinc wave

Solved!
Go to solution

Can anyone please show me how to convert square wave to sinc wave?

0 Kudos
Message 1 of 61
(6,822 Views)

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?

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 61
(6,798 Views)
Solution
Accepted by keni

Sinc function

 

Aargh! I hate it when I press the wrong button... Taking the fourier transform of a square wave gives you a sinc function.

Message 3 of 61
(6,790 Views)

Sine, sinc,  OMG,  Smiley Surprised  I need glasses.

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 61
(6,785 Views)

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?

0 Kudos
Message 5 of 61
(6,766 Views)

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.

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 61
(6,763 Views)

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?

0 Kudos
Message 7 of 61
(6,748 Views)

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.

0 Kudos
Message 8 of 61
(6,734 Views)

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.

 

19413iD726E8314777A307

 

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.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 61
(6,731 Views)

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

 

Steve

0 Kudos
Message 10 of 61
(6,716 Views)