Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

05-07-2012 11:52 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello,

I need some help with preprocessing my acquired data. I am measuring low frequencies with an PCI-5122. The signal is gathered and transformed with a FFT. In order to correct the errors from the splitting of the peak, I calculated the amplitude sum (A=sqrt(sum_i (A_i)^2 )) of the involved bars, as shown in the FFT tutorial from NI. (http://www.diadem-forum.de/attachment.php?aid=280 , sorry, only in German) This works well so far.

Now, I need a window function for my measurement. But, when I use a window function (von-Hann or Hamming, I tried both) and then calculate the amplitude sum the result is not correct even if I use the correction factors named in literature. The resulting amplitude I get with this method is larger (!!!) than the input signal (I tested this with a frequency generator).

Is there a problem in the use of both correction methods? Or do I make another mistake?

I would be glad about any suggestions.

Thanks.

Silja

05-10-2012 03:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Well, thats quiet a specific problem. I am not sure whether I know enough about the topic but if you want I can check your code and try to figure out what is going wrong.

Just to get this straight. Your program is working right? So this is no question about how to use LabView but about the content.

05-14-2012 07:00 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hello,

I am not using Labview. I use a C# program which I assume to work right. The problem just occur in the evaluation steps, so I hope this is the right forum even if it is not Labview I am using. I transform the data with a FFT function. This steps works correct, too. Only if I try to improve the data with a window function, the results seem to be wrong.

Here is my FFT-code, including the window function and the correction term. Maybe, there is something wrong.

unsafe private int DoFFT(string chan, int Samp, double[,] Data)

{

try

{

FFTDataK0 = new niscope_acq.Complex[PowerOfTwo];

double h = 1.0;

bool doTransform = (comboBoxFilter.SelectedIndex != 0); //selects if I want to use awindowing function

for (int i = 0; i < PowerOfTwo; i++)

{

if (doTransform)

{

h = Math.Sqrt(8 / 3.0) * 0.5 * (1 + Math.Cos(2 * Math.PI * (i - (PowerOfTwo - 1) / 2) / (PowerOfTwo - 1))); // 1/0.5 - correction value for von-Hann-window (Hanning-window)

}

FFTDataK0[i] = new niscope_acq.Complex(Data[1, i] * h);

}

FFTDataK0 = niscope_acq.DiscreteTransforms.FastFourierTransform(FFTDataK0);//

}

catch (Exception ex)

{

MessageBox.Show(ex.Message);

Log("Error in DoFFT: " + ex.Message);

}

finally

{

}

return 1;

}

05-21-2012 07:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Mmh sorry aber da bin ich wirklich überfragt. Das ist eine rein inhaltliche Frage und ich kann leider keinen wirklichen Bezug auf NI Produkte erkennen.

Am Besten versuchst du es in einem anderen Forum nochmal

Viel Glück