09-10-2018 04:32 AM
Hi,
My issue is similar to this thread. I am trying to get frequency resolution of 0.25 Hz while performing continuous PSD.
I have tried circular buffer, but it doesn't solve my problem.
There are 2 issues,
(i) results not matching with expected output
(ii) -Inf values in PSD, when input signal frequency is in integer multiple.
Pls note, I am using PSD block from Sound & Vibration library.
I have attached simplified version of code (LV12) and snippets herewith.
Please let me know, if any more details are required.
Thanks,
Nikunj
Solved! Go to Solution.
09-10-2018 07:29 AM
Why are you enqueue-ing an array?
Enqueue elements instead. Then in the dequeuer, either wait for an element, or check if it times out.
Not that that will help your problem, but when there's a bug simplification is usually a good idea.
The first two iterations, those PSD VIs are called with uninitialized data. That might screw them up, and the result is put in the shift register. So it might never get better...
09-10-2018 07:40 AM
If you have a piece of code that gives you the "expected" .25 Hz resolution, why aren't you using that?
Do you see the differences in the block diagram between the "actual" and the "expected"?
In order to get 1/4 Hz resolution on a spectrum, you need to collect 4 seconds worth of data before you analyze it.
09-10-2018 07:53 AM - edited 09-10-2018 07:55 AM
wiebe@CARYA wrote:
Why are you enqueue-ing an array?
Enqueue elements instead. Then in the dequeuer, either wait for an element, or check if it times out.
Not that that will help your problem, but when there's a bug simplification is usually a good idea.
The first two iterations, those PSD VIs are called with uninitialized data. That might screw them up, and the result is put in the shift register. So it might never get better...
Thanks for a quick reply.
I do understand your point.
1) In my actual application, I am acquiring signals of multiple channels, hence i kept architecture same, i.e. enqueue-ing array of waveform. Also, I have used same architecture for 'testExpected.vi', which is giving proper output.
2) I initialized all 3 shift registers with waveform of 1000 points and 0 value, still output goes to -ve infinity @ 11hz.
09-10-2018 08:12 AM - edited 09-10-2018 08:14 AM
@RavensFan wrote:
If you have a piece of code that gives you the "expected" .25 Hz resolution, why aren't you using that?
Do you see the differences in the block diagram between the "actual" and the "expected"?
In order to get 1/4 Hz resolution on a spectrum, you need to collect 4 seconds worth of data before you analyze it.
Sorry, I don't understand your point.
As i understand, DeltaF = Fs/ N.
Hence, using shift register I accumulated data of previous 3 seconds and concatenated with current data, to get total 4 second data.
NOTE:
1) Though I mentioned incorrect time domain waveform, but now i understood, it's not a problem. It's going to be like that only.
2) Attached output from trialExpected @ 11hz.
09-10-2018 10:38 AM