LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Impulse to sine wave.

Hi. I have the problem, I have the LC circuit. The input signal is the periodic impulse with duty cycle=50%. I change the frequancy of the input signal and when it is the same as the resonant frequancy the output signal is sine wave. How can I get this? I used the right and inverse FFT but nothing happened. I want to use the transcmission function of the RLC circuit.

Thank You.
0 Kudos
Message 1 of 8
(3,765 Views)
Dimon,
 
I am unclear about your specific application. Let me repeat what I believe you are trying to accomplish and let me know if I am on the same plane as you are:
 
You are creating a periodic impulse signal in LabVIEW which you are outputting to an LC circuit. You are then changing the frequency of this periodic impulse until you are able to read a sine wave back into LabVIEW from the LC circuit.
 
Is this a correct description of your application? Please post again to let me know if this is correct or not so that I can start pursuing a solution with you.
 
Thanks!
 
Cheers,
 
Jonah
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 2 of 8
(3,743 Views)
Hi. The description is right. I post the vi with my problem.

Thank You.
0 Kudos
Message 3 of 8
(3,730 Views)
Your biggest problem is that you are multiplying the array of spectral points (an array of complex numbers) by a real scalar. This simply changes the magnitude of all the points in the spectrum.

I think what you want is to multiply each point in the spectral array by the transfer function magnitude at the frequency represented by that point.

To do that you need to find the center frequency of each bin in the spectrum. Then calculate the transfer function value for that frequency and multiply the value for that bin. Then do the inverse transform on the weighted (multiplied) array.

Lynn
0 Kudos
Message 4 of 8
(3,715 Views)
So, you suggest me at first to determine the frequancies of the harmonics of the square wave. Then these frequancies put to the transmission function, definite the module of the function, multiply its meanings with the amplitudes of the harmonics and use inverse FFT?
0 Kudos
Message 5 of 8
(3,706 Views)
What I was suggesting was slightly different. It does not require determining the harmonic frequencies. Look at the context help for the Fourier transform functions. It explains how to determine the frequency of each element of the array which comes out of the FFT function. Put those frequencies into your transfer function and calculate transfer function value at each frequency. Then multiply each element of the FFT array by the transfer function value for that frequency. Use the resulting array as the input to the inverse Fourier transform.

This sounds complicated to describe in words but it is quite easy to implement in LabVIEW with a loop.

This sounds like a school assignment, so I am trying to explain to you how to do it rather than doing it for you.

Lynn
0 Kudos
Message 6 of 8
(3,700 Views)
Hi, I corrected my vi, but there is another problem.
How can I create the sum of the sine waves using the for loop structure?
Please, look at my vi.

Thank you.
0 Kudos
Message 7 of 8
(3,671 Views)
Hi Dimon,
 
You can sum your sine wave together by using the "Merge Signals" VI and a shift register. This will allow you to add a waveform to the current shift register which is saved across the for loop interations. See the attached VI and let me know if you have any further questions.
 
Cheers,
 
Jonah
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 8 of 8
(3,630 Views)