LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write FFT of double integrated data

Solved!
Go to solution

I am beginer for Labview environment.
I have acceleration Vs time dat in .lvm file
Then I get double integration of this
acceleration data to get displacement data.
Then I get FFT of displacement and displayed on graph.
Upto this point VI works
But if now i connect this FFT of displacement to 'write measurement file' then it shows error.
Please help me......and fix the error....  All I want is two column data, one of frequency and

other of displacement amplitude.
I have attached all files
I request you to correct the VI please..
Thanking You!

0 Kudos
Message 1 of 6
(3,062 Views)

The issue is the "spectral measurements" output is a cluster of 3 elements (f0, df, and an array of values).  The write measurements file VI expects a "signal" or "array of signal".  I used build waveform to map the cluster elements to a waveform and used a FOR loop to ensure all of the elements in the array of cluster were mapped.   I was not sure what to do for f0.  Build waveform is expecting a timestamp -- I could map a zero into time and wire that to t0 but I believe it will be written in the file as time and it will not be obvious that it started out a as frequency.

0 Kudos
Message 2 of 6
(3,052 Views)

Thank you so much for the reply.
As I know, FFT is complex number.
So its components are Magnitude, Phase, Real and Imaginary parts.
In the earlier solution you sent, what is the output of 'FOR loop'?
Is it the magnitude (it is written there as 'magnitude')?
I need imaginary part Vs frequency as output in my further work. How to get it?

I also request you to look into VI attached here named as 'Imaginary part of FRF extraction'
In this VI, I am basically interested in writing the data 'Imaginary part of FRF (i.e. Y/X) Vs Frequency'
I tried to introduce 'FOR loop' which you suggested, but it didnt work.
I know errors are because of mismatch of data types between source and sink,
but I could not rectify those, as my knowledge about Labview is only two week old.
Could you please send the corrected VI?

I could not attach your earlier solution because more than 3 attachments are not allowed I think......
Please save the VI in lower version (labview 11)

Thanking you again!

Regards!

0 Kudos
Message 3 of 6
(3,006 Views)
Solution
Accepted by topic author nareshjaiswal

The concepts you'll want to research are "arrays", "indexing arrays", "auto indexing", "cluster", and "waveform datatype".  

 

The FOR loop in the first VI I sent used auto indexing to take each element from a 1D array of clusters and do operations on them separately to convert them to a waveform.  The ouput tunnel also uses auto indexing so that the end result is a 1D array of waveforms.  I used the FOR loop so that no matter how many elements were in the array, you would get a corresponding number of waveforms passed to the "write to measurments file".

 

In this case, because the output of the FRF is a single cluster (not an array of clusters), the FOR loop was not needed.  The VI attached this time takes the cluster output of the FRF and maps the cluster components it to a single build waveform function and you get a single waveform result.  

 

I do not have Sound and Vibe loaded on my computer at the moment, so I cannot run your VI and see the output of the SVL integration VI.  The output datatype is "1D array of waveform" and your indicator and your FRF both can accept only single waveforms.  I put an index array function in between the integration and the indicator/FRF but if there is more than one waveform in the array this would be the incorrect solution.  My solution fixes the broken wires but throws away waveforms 2,3,4.... if they exist.  

Message 4 of 6
(3,002 Views)
Thank you so much, once again Its running. I will process it further, and compare it with theoretical results. My Warm Regards to you!
0 Kudos
Message 5 of 6
(2,994 Views)

I don't see any obvious reasons for your symptoms in your block diagram.

 

A few questions:

 

Which indicator specifically is not responding as it should ?

Does the While loop exit normally (by pressing Stop and  not on its own)?

Do you do anything different when you run "Circuit 2" in its own VI?

What do you get when you put a probe on the 4 signals coming out of the split signals function just after the DAQ assistant?  Do channels 1 and 2 look similar to 3 and 4?

Is there one charging relay for both batteries?

Are you sure circuit 2 really is drawing current to be measured in this setup? 

 

 

 

0 Kudos
Message 6 of 6
(2,983 Views)