LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure windowing parameters

Solved!
Go to solution

Dear all,

 

In LabVIEW, we can use windowing (window function) to get the desired signals. However, we just can select what kind of windowing (Hanning, Hamming, ...). The length of windowing is the length of acquired signal, and the center of windowing is the center point of signal. Is there any way to configure these parameters?

 

In fact, I am acquiring a signal with configuration of 10k samples and sample rate of 10k, so I get 10k point in 1s. But I only want to get a part of that data, let say from point 2k to point 3k. I think that by applying a windowing I can get the data from 2k to 3k and set all other data point to be zeros.Original acquired signalOriginal acquired signalWhat I want to getWhat I want to get

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you so much!

 

Micheal 

0 Kudos
Message 1 of 8
(2,690 Views)

Hi Michael,

 

when you want to get a subset of an array of samples you should use the ArraySubset function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,661 Views)

Do you know exactly what location you are interested in or does the program need to detect the location and width based on certain features of the signal?

 

If the location is fixed, you could create a "weight" array of equal length that contains values between zero and one for each location, then multiply if with your data. In the simplest case the array would be a mask which is 1 in the region of interest and zero everywhere else.

 

What kind of signal is that? What is the source of the artifacts? What kind of information do you want to get out of it (e.g. delay, width, etc.)

 

0 Kudos
Message 3 of 8
(2,651 Views)

Dear GerdW and Altenbach,

 

I don't know in advance the exact location and width of the interested signal. A triggering function will detect the location and maybe width (up to now I set the number of data points based on my observation using Trigger and Gate vi).

 

The signal is the vibration signal from an accelerometer during an manufacturing operation. I want to get the transient signal when the motor start to run up or shut down. Then I want to analyse the signal using some spectral analysis (Power spectrum or Frequency response ...).

 

Micheal

 

0 Kudos
Message 4 of 8
(2,629 Views)

Hi Michael,

 

A triggering function will detect the location and maybe width

So yu "know" the position in your array: use ArraySubset on the sample array…

 

I want to get the transient signal when the motor start to run up or shut down.

So you look (for "motor run up") for a period in your signal when there is just noise (small amplitudes, small deviation) followed by a bigger amplitude with bigger deviation…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(2,616 Views)

Dear GerW,

 


 

So yu "know" the position in your array: use ArraySubset on the sample array…

 


But the location may different in different acquisition. I want to extract the signal while continuously acquire new data. So I down't know how to "activate" the ArraySubset at right time and then "put" the desired data  into an array of the same size with the original one and have all other values equal zero at the same position.

 

So you look (for "motor run up") for a period in your signal when there is just noise (small amplitudes, small deviation) followed by a bigger amplitude with bigger deviation…


That's exactly what I am looking for: a transient period when the signal changes abruptly. 

 

Micheal

0 Kudos
Message 6 of 8
(2,614 Views)
Solution
Accepted by topic author don_Micheal

Hi Michael,

 

But the location may different in different acquisition. I want to extract the signal while continuously acquire new data. So I down't know how to "activate" the ArraySubset at right time

So you know how to detect the ROI and to get the index values for the ROI?

Apply ArraySubset on your collected data: you can wire calculated values instead of constants to this function…

 

then "put" the desired data  into an array of the same size with the original one and have all other values equal zero at the same position.

InitArray with same size as your signal array, then ReplaceArraySubset with the subset from step 1…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 8
(2,609 Views)

Dear GerdW,

 

So you know how to detect the ROI and to get the index values for the ROI?

Apply ArraySubset on your collected data: you can wire calculated values instead of constants to this function… 

 


I compare the extracted data with the original one to find  the index values for the ROI.

 


@GerdW InitArray with same size as your signal array, then ReplaceArraySubset with the subset from step 1…

Then Replace the extracted array to the zero-array the the location of it in the original array. It works well. I solve the problem!

Thank you so much!

 

Micheal

0 Kudos
Message 8 of 8
(2,566 Views)