LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power spectrum density peak shift

Solved!
Go to solution

I'd like to know what kind of algorithm the PSD functions shown on the picture I attached use.  Do they use DFT, FFT?  

I've got a problem when I increase the sampling rate to measure PSD of a sine wave signal.  To make sure there's nothing wrong with the signal, I use wave function generator directly connected to the FPGA analog input.

I am using FPGA PCI7833 and I use DMA method to make sure that the sample interval between samples are exactly the same.

When I use a 10kHz sampling rate to measure a 400Hz sine wave, I get a peak at exactly 400Hz.  But with I use sampling rate of 70kHz and 80kHz to measure 400Hz and generate PSD, the peak shifts to other frequecies, no matter which function I use.  I also made sure that bin match between the frequencies and sample size.  By reading the material on http://zone.ni.com/devzone/cda/tut/p/id/4541#toc6, I made sure that there should be a data point at eactly 400Hz.

Would it have to do with the inteval conversion?  How to avoid this? 

Could someone tell me what might be problem causing this?  Thank you very much!

 

Best,

Charles

 

0 Kudos
Message 1 of 4
(2,266 Views)

Good Morning,

 

Do you think you could post a copy of your VI?  This is very strange that increasing the sampling rate would give you a frequency shift on the PSD like you have received.  I hope this helps!

 

Kind Regards,

 

Cody Covington

Applications Engineer

National Instruments

ni.com/support 

0 Kudos
Message 2 of 4
(2,238 Views)

Yes, I attached the files.  The data files are collected from 400Hz sine wave from wave function generator.  10kHz sample rate returns  a peak at 400Hz as shown on the picture above.  However, 70kHz and 80kHz seems not match the sample rate.  You can see the number of data points in the vi.  I believe it should match because f*n/fs is an integer, where f is frequency of interest, n the number of data points, fs sample rate.  Thank you very much. 

0 Kudos
Message 3 of 4
(2,228 Views)
Solution
Accepted by topic author soljiang

Oh, sorry, i think there's a sample rate problem.  I solved the issue.  Thank you very much.

0 Kudos
Message 4 of 4
(2,224 Views)