# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## convert square wave to sinc wave

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

Message 1 of 61
(2,440 Views)

## Re: convert square wave to sinc wave

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
Message 2 of 61
(2,416 Views)
Solution
Accepted by topic author keni
08-27-2015 04:09 PM

## Re: convert square wave to sinc wave

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
(2,408 Views)

## Re: convert square wave to sinc wave

Sine, sinc,  OMG,    I need glasses.

- tbob

Inventor of the WORM Global
Message 4 of 61
(2,403 Views)

## Re: convert square wave to sinc wave

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?

Message 5 of 61
(2,384 Views)

## Re: convert square wave to sinc wave

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
Message 6 of 61
(2,381 Views)

## Re: convert square wave to sinc wave

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?

Message 7 of 61
(2,366 Views)

## Re: convert square wave to sinc wave

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.

Message 8 of 61
(2,352 Views)

## Re: convert square wave to sinc wave

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.

- tbob

Inventor of the WORM Global
Message 9 of 61
(2,349 Views)