LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How average in spectral magnitude work in Spectral Measurement

Hi everyone,

 

I am a Computer Science student and currently working on a project that need to transfer the work done in LabVIEW into other programming language (python). 

 

I was following the tutorial "LabVIEW_Spectral_Tutorial" and instead of calculating Power Spectrum I need the Magnitude Spectrum of the signal. I replicate the tutorial but added a lowpass filter and using Spectral Measurement to calculate the FFT then save the last waveform as txt file. However, in the last block, I do know the objective of the average function but I don't know how it was done in LabVIEW.

Lets say the number of averages is 5, does it mean the signal is recorded 5 trials then compute fourier transforms of each trial, get magnitude spectrum and average this across trials ? If so, how can I extract or save each result of these FFTs ? how do I know when and where the signal is recorded because It was recorded 5 times? 

 

I attached the VI (LV 2012 version) for your reference.

 

Thank you!

0 Kudos
Message 1 of 2
(1,150 Views)

Hi nguyenlk,

 


@nguyenlk wrote:

I replicate the tutorial but added a lowpass filter and using Spectral Measurement to calculate the FFT then save the last waveform as txt file. However, in the last block, I do know the objective of the average function but I don't know how it was done in LabVIEW.


When you convert that ExpressVI into a regular subVI (by using it's right-click menu) then you can dive into its "inner" code to explore how NI designed the averaging algorithm…

(Be aware of diving several layers of VI hierarchy!)

Best regards,
GerdW


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