LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Machine learning and FFT

Hey!

I'm trying to apply machine learning after taking FFT. In the waveform chart the magnitude is .7 as shown in the attached picture but when I try to get the magnitude of it by using simple indicator the value is in exponential. Can somebody please tell me how to just reduce it to below 1. 

Secondly, how can I apply KNN on the magnitudes. There is no vi available in Machine learning toolkit

 

Regards

 

0 Kudos
Message 1 of 5
(2,705 Views)

Hi Chishti,

 

In the waveform chart the magnitude is .7 as shown in the attached picture but when I try to get the magnitude of it by using simple indicator the value is in exponential. Can somebody please tell me how to just reduce it to below 1. 

So there are two problems:

  1. You are doing something in your VI to determine those peak magnitudes, which apparently is done wrong. Unfortunately all we get is an image of part of your frontpanel…
  2. You aren't able to read numeric values: 1e-17 is something near zero! So it is well "below 1"…

 

Best regards,
GerdW


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

Please find the attached vi

 

0 Kudos
Message 3 of 5
(2,645 Views)

The VI you attached doesn't match the one in your picture because you don't have that "Magnitude" array indicator.  My guess is you are only showing the first 4 elements or "bins" coming out of the FFT which are going to be nearly zero.

 

What do you mean by "get it below 1"?

0 Kudos
Message 4 of 5
(2,615 Views)

If you by "get it to just below 1" mean Normalizing, you need to divide all values with the Max value of the FFT array, in this case ~0.73 (there's a find Array Max-function).

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,562 Views)