Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

apply waveform

What I need to do, is to convert the 'Signal Input' array, into an array that represents
frequency and voltage for the Threshold 1D Array function to work correctly. The waveform has
10000 data points at .125Hz, 0 to 1250 Hz.
0 Kudos
Message 1 of 8
(3,674 Views)
Dear Don,

It looks like your input array is an array of frequency magnitudes. In general, to convert a set of frequency points to a time waveform, use one of the Inverse FFT VIs located under Analyze >> Signal Processing >> Frequency Domain on the Functions palette. These functions are not included in all versions of LabVIEW, though. Be sure to read the help for each of these VIs to be sure that you are using the correct one, and giving it the correct input; it is very easy to input bad data to an inverse FFT calculation and get invalid results. It is likely that you will need additional information about your signal (like the imaginary component or the phase) in order to properly take the inverse FFT.

As another note, I think that your while loop
might be better replaced with a for loop. A while loop with a false constant connected to its stop condition will never terminate. A for loop with nothing wired to the N input will execute exactly once for each point in the input array connected to the loop.

It is difficult for me to understand what your exact application is without more information. Is there a signal source that corresponds to your input array? Can you explain the information you are trying to achieve by thresholding reference voltage and frequency sets with each point in your signal array? Please reply with more details on your application if this is not enough information to solve your problem. I have attached your VI with a few of the modifications mentioned here as a demonstration of what you may need for your application.

Thank you,
Kyle Bryson
National Instruments
0 Kudos
Message 2 of 8
(3,674 Views)
> Thanks for your response. I was vague in my request. Basically, the input signal is derived from the 'SVT Power Spectrum.vi'. It is setup to produce a voltage/frequency spectrum waveform graph with 10000 data points and a resolution of 1/8Hz (.125Hz), from 0 to 1250 Hz. The Power Spectrum vi output unbundels to F0,DF, and Magnitude.
My other input is from disk, and is a calibration reference file which contains voltage and frequency arrays.
As the reference frequencies may differ with the SVT input, I use the Threshold 1D Array tool for INDEX numbers, which are then used later to merge the two source voltages. The Threshold tool must have dual frequency inputs.
In another case, I use the output of the SVT Spectrum Peak Search.vi to do this process, and it works because this vi outputs frequency and voltage, using the Unbundle tool.
Thanks, mail me for more info if needed...DH


Dear Don,

Thanks for the additional details. I think I am beginning to better understand your goal. Let me try to clarify what I think you are trying to do, and then correct or confirm my interpretation.

I think you are taking an input from some real system and calculating its spectrum or frequency response. I believe that you have a file containing a similar spectrum or response that should either match the measured one or be in some way compared with it. The spectrum for your input signal contains 10000 points from 0 to 1250 Hz, but your reference file may contain different points over the same range. You want to use the threshold VI to find an index for each point in the reference, where that index in the measured spectrum would be the same frequency as the reference point.

I think I was confused by a little of our terminology. The only voltages in this picture are the original waveform that is the input to SVT Power Spectrum. Remember that the output of SVT Power Spectrum contains an array of magnitudes, which indicate the amount of power (which is proportional to the square of voltage) in the signal at a particular frequency. I think that is okay for this application, assuming your reference file contains power values that were generated in a manner consistent with what we are comparing them to.

As a matter of logistics, please reply to posts here on the forum; I will be notified and able to respond quickly to a post here, but not through an e-mail to the webmaster.

Thank you,
Kyle Bryson
National Instruments
0 Kudos
Message 3 of 8
(3,674 Views)
Hi Kyle, we are close, all I really need is to compare two frequencies for their index value. I have not figured out how to create the frequency and voltages from the real system into a 2D array, which is the output of a SVT Power Spectrum.vi.

Thank you,
Don Hartge
NSWCCD
0 Kudos
Message 4 of 8
(3,674 Views)
Hi Don,

I think I'm on the same page, but if I'm missing what you're after, keep steering me in the right direction and we'll get your answer.

I think you want a 2D array like this:

Frequency 0 .125 .250 .375 .500 .625 ...
Power 0 1.3 0 .7 34 5 ...

such that the power (voltage?) value for each frequency is in the same row/column as the value of that frequency.

If that's the case, you want to build an array of the frequency values, and use Build Array to combine that with the magnitude unbundled from the SVT Power Spectrum to form your 2D array.

I've attached an example doing just that. Let me know if that's our solution, or else try to help me understand what I'm missing.

Have a n
ice day,
Kyle Bryson
National Instruments
0 Kudos
Message 5 of 8
(3,674 Views)
Thanks again Kyle, this is good. I need to take the .125 samples and average eight of them along with 8 associated power points, to get a 1Hz output. After 10k points this will result in 1250Hz, 1/8(.125) of 10K.
Again thanks
Don Hartge
NSWCCD
0 Kudos
Message 6 of 8
(3,674 Views)
Kyle, I finally realized my problem and fixed it. Thanks so much. Cockpit error with just adding up the .125 items.
dh
0 Kudos
Message 7 of 8
(3,674 Views)

Hello Guys,

 

I have been puzzled over the past days how to apply random waveforms to a positive edge-triggered JK Flip-Flop. My really challenge is how to generate those waveform into multisim before applying them into JK Flip-Flop.

Thanks for your reply.

Thierry7.

0 Kudos
Message 8 of 8
(3,202 Views)