07-01-2017 11:15 PM
I have two vibration signal with different time stamps. One vibration run for 6 second and the other is for 3 seconds. I want to substract the PSD of one signal from another. when I run the program it gives me an error of different time stamps.
According to my knowledge PSD is frequency representation of the signal even though time stamps are different ot should still work. If not then tell me any blick that I could use to break the data into same time stamps
Solved! Go to Solution.
07-02-2017 01:37 AM
before subtraction, you probably want to re-sample them over the same x-range and the same number of points.
Can you show us some of your code? What is the datatype (dynamic, waveform, array ,etc.)?
07-02-2017 10:03 AM - edited 07-02-2017 10:05 AM
Thanks for the reply
Please find the VI and the raw data in attachment. As my data is a text file I am using delimited text to read the data. I can't change the value of dt as it is the sampling time
What might I change to read the data.
07-02-2017 11:25 AM - edited 07-02-2017 11:26 AM
1. There is a Resample Waveform function that you should use to resample original waveform to the same as your fault signal.
2. You will need to truncate your data so that both waveforms have the same number of samples.
07-02-2017 08:26 PM
You created a loop within it you are using array subset. What kind of loop is it according to picture it seems like an "in place Element structue". I have never used this loop. Whats the purpose of the loop and how to add those X and Y on the loop?
07-02-2017 09:15 PM - edited 07-02-2017 09:15 PM
An IPE structure is not a loop. All it does is unbundle the array data, trim to size, and re-bundle back into the waveform.
Note that Tim's "picture" is actually a LabVIEW snippet, so just drag it to the diagram of an new VI and it will magically turn into real LabVIEW code. Now just right-click on anything you don't understand and call up the LabVIEW help. 🙂
07-02-2017 11:35 PM
Sorry I can't do that as I am using version 15 and he created the program using version 16 so I thought to create it myself. Can you do me a favour to save the program as older version
07-03-2017 02:27 AM
This is a good exercise for you. All you need to do is place an in-place-element-structure, right-click ... add a waveform bundle/unbundle terminal pair and wire up as shown.
Do you have problems with any other part of the diagram?