LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Spectral Density retains history without averaging

Solved!
Go to solution

I've made the attached VI in order to read saved variables from a file, however each time I run it with the same file and the same number of samples, the PSD plot differs. It changes in a predictable manner, i.e. the first run on a file after opening the VI will always yield the same result, the second run will also yield the same result, but different from the first run, etc., so there's no random thing about it. As far as I could gather, it's because of the PSD's history retaining, however I have it set to no averaging and linking true to restart averaging doesn't help. Any ideas?

0 Kudos
Message 1 of 6
(2,766 Views)
Solution
Accepted by topic author danthonius

Hi danthonius,

 

1. clean up your VI

2. replace feedback nodes by shift registers (for better understanding of DATAFLOW!)

3. initialize the shift registers…

(4. Remove the RubeGoldberg stuff.)

See here:

check.png

The InsertIntoArray still looks fishy to me…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,737 Views)

There is an IIR Filter inside the PSD with an initial value of 0.  Wrap a for loop around PSD with N= 1 or 2 selected from "First call"


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(2,732 Views)

@JÞB wrote:

There is an IIR Filter inside the PSD with an initial value of 0.  Wrap a for loop around PSD with N= 1 or 2 selected from "First call"



Thank you, but I may have not implemented what you said properly, as it didn't seem to work for me. GerdW's solution worked, so I went with that.

0 Kudos
Message 4 of 6
(2,723 Views)

@GerdW wrote:

Hi danthonius,

 

1. clean up your VI

2. replace feedback nodes by shift registers (for better understanding of DATAFLOW!)

3. initialize the shift registers…

(4. Remove the RubeGoldberg stuff.)

See here:

check.png

The InsertIntoArray still looks fishy to me…



Thank you! That worked. Still don't have any idea why it happened, though.

Message 5 of 6
(2,720 Views)

@danthonius wrote:

@GerdW wrote:

Hi danthonius,

 

1. clean up your VI

2. replace feedback nodes by shift registers (for better understanding of DATAFLOW!)

3. initialize the shift registers…

(4. Remove the RubeGoldberg stuff.)

See here:

check.png

The InsertIntoArray still looks fishy to me…



Thank you! That worked. Still don't have any idea why it happened, though.


The first "I" in IIR is infinate.

 

Infinate Impulse Response.  IIR filters assume an original magnitude.   In this case, 0,0i.  Not great if you jam from IQ to polar coordinates.  Where, often theta might vary but, rho equals 1.   There is a filter induced artifact because of the incorrectly assumed initial value  

 

LabVIEW is not only language that makes this assumption.   The assumption is correct, your use case fails an axiomatic tautology. 

 

You're using the vi with invalid assumptions. 

 

 


"Should be" isn't "Is" -Jay
Message 6 of 6
(2,705 Views)